Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel getmany if generation_id changes #234

Merged
merged 2 commits into from
Dec 10, 2021

Conversation

ekerstens
Copy link
Contributor

Description

Found one more edge case where events from before a rebalance can leak through. Consumer.getmany is designed to break out of the loop during a rebalance. However, if the asyncio loop never returns control to getmany during the rebalance, it will continue to yield events from before the rebalance, and on_message assigns the incorrect generation_id` Adding logic to check if the generation_id has changed for more robust handling.

@codecov-commenter
Copy link

Codecov Report

Merging #234 (e4b1391) into master (d9533ca) will decrease coverage by 0.02%.
The diff coverage is 40.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #234      +/-   ##
==========================================
- Coverage   94.35%   94.33%   -0.03%     
==========================================
  Files         100      100              
  Lines       10754    10759       +5     
  Branches     1470     1471       +1     
==========================================
+ Hits        10147    10149       +2     
- Misses        540      542       +2     
- Partials       67       68       +1     
Impacted Files Coverage Δ
faust/utils/json.py 100.00% <ø> (ø)
faust/transport/consumer.py 95.28% <40.00%> (-0.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9533ca...e4b1391. Read the comment docs.

@patkivikram patkivikram merged commit df79e3e into faust-streaming:master Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants