-
Notifications
You must be signed in to change notification settings - Fork 14.8k
MINOR: update method name from createGroupTombstoneRecords to createGroupTombStoneRecordsAndCancelTimers
#20949
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
base: trunk
Are you sure you want to change the base?
Conversation
| List<CoordinatorRecord> records | ||
| ) { | ||
| group.createGroupTombstoneRecords(records); | ||
| timer.cancel(streamsInitialRebalanceKey(group.groupId())); |
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.
It is actually a bit weird to have this here. createGroupTombstoneRecords applies to all group types but the timer is only for streams. What's the reasoning?
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.
cc @lucasbru
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.
It won't have an effect for other group types. But we could move this into Group implementation, but then we should probably also rename this method.
chia7712
left a comment
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.
@RaidenE1 thanks for this patch!
|
|
||
| @Override | ||
| public void cancelTimers(CoordinatorTimer<Void, CoordinatorRecord> timer) { | ||
| timer.cancel("initial-rebalance-timeout-" + groupId); |
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.
To keep the code consistent, we could add a static helper to StreamGroup and use it to implement GroupMetadataManager.streamsInitialRebalanceKey
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.
thanks, fixed
| Group group = groups.get(groupId); | ||
| if (group != null && group.isEmpty()) { | ||
| createGroupTombstoneRecords(groupId, records); | ||
| createGroupTombstoneRecordsAndCancelTimers(groupId, records); |
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.
Could we pass group instead of groupId?
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.
Yeah that's a good point, fixed, thanks
Since now we are canceling timers in the method, we need to update the method name