-
Notifications
You must be signed in to change notification settings - Fork 138
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
Extract Committer and RebalanceCoordinator classes from Runloop + unit tests #1375
Open
svroonland
wants to merge
46
commits into
master
Choose a base branch
from
separate-rebalance-listener-file
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,085
−492
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…cala Co-authored-by: Erik van Oosten <[email protected]>
…cala Co-authored-by: Erik van Oosten <[email protected]>
…cala Co-authored-by: Erik van Oosten <[email protected]>
svroonland
commented
Nov 10, 2024
zio-kafka/src/main/scala/zio/kafka/consumer/internal/RunloopRebalanceListener.scala
Outdated
Show resolved
Hide resolved
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.
The idea of extracting the Committer
is really nice. Without this, extracting the rebalance listener would be very hard.
I don't see any thing obviously wrong but since so much code moved around this is a huge PR. So I will have to take a deeper look once this PR exists draft.
zio-kafka/src/main/scala/zio/kafka/consumer/internal/Committer.scala
Outdated
Show resolved
Hide resolved
With rebalanceSafeCommits, we expect all pulled records to be processed and committed.
Helps understanding the logic here
Base automatically changed from
more-rebalance-safe-commits-logging
to
master
November 10, 2024 19:42
svroonland
changed the title
Extract Committer and RunloopRebalanceListener classes from Runloop
Extract Committer and RebalanceCoordinator classes from Runloop
Nov 13, 2024
svroonland
changed the title
Extract Committer and RebalanceCoordinator classes from Runloop
Extract Committer and RebalanceCoordinator classes from Runloop + unit tests
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code is mostly just moved to a different place, the logic was left mostly intact. The 'interface' between the components has been decoupled more, i.e. the rebalance listener no longer access the full Runloop's State and the pending commits are stored internally in the Committer.
Care has been taken to make the Committer usable during rebalancing as well, with the proper access to the Consumer for example. The part that waits the end of the streams and their commits has been changed to use the Committer.
Includes unit tests for the two new components.