-
Notifications
You must be signed in to change notification settings - Fork 597
rhythm: fair partition consumption #4655
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
rhythm: fair partition consumption #4655
Conversation
HI, Javi. You have the docs box checked in the description but I don't see any. Are you working on docs for this? |
My bad, I clicked all of them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes. I think the PR is going in the right direction 👍
Have some thoughts and nitpicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with these changes. I'll approve when this discussion is resolved
+1 changes lgtm but defer to the rest of the team for final approval. |
What this PR does:
The current loop has two drawbacks. The first one is that it keeps consuming from a single partition while it has a record, neglecting the others. This is not a problem right now since every blockbuilder is in charge of a single partition. The second problem is the main run loop; after consuming a complete cycle (that can take much more than the consuming cycle due to the first drawback), it waits another fixed time, incrementing the lag.
This PR tries to tackle this by first prioritizing the partitions with more lag. For that, we get first the lag in time for every partition. We continue consuming from the laggiest partition until the lag is less than the cycle time.
The number of FetchOffsetsForTopics and ListEndOffsets requests has been reduced now to only one request per cycle instead of one request for every partition cycle
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]