Skip to content

[ak-cherry-pick]KAFKA-14950: implement assign() and assignment() and resolve some conflicts#32

Merged
philipnee merged 4 commits into
ctr-stagingfrom
cherry-pick
Jul 28, 2023
Merged

[ak-cherry-pick]KAFKA-14950: implement assign() and assignment() and resolve some conflicts#32
philipnee merged 4 commits into
ctr-stagingfrom
cherry-pick

Conversation

@philipnee

Copy link
Copy Markdown
Owner

This is a cherry pick of 14950 into ctr-staging.

Philip Nee and others added 3 commits July 25, 2023 13:55
We will explicitly send an assignment change event to the background thread to invoke auto-commit if the group.id is configured. After updating the subscription state, a NewTopicsMetadataUpdateRequestEvent will also be sent to the background thread to update the metadata.

Co-authored-by: Kirk True <kirk@kirktrue.pro>
Reviewers: Jun Rao <junrao@gmail.com>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm doing this on purpose - I don't think we want auto-tick for most of the time. If we do I can revert this

@kirktrue kirktrue left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes needed, but otherwise LGTM.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offsets param seems unused, is the intention to use it in the future?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my understanding, why can't we rely here on the existing metadata object with the metadata.requestUpdateForNewTopics call? I see that's still used for this same purpose in other places like the PrototypeAsyncConsumer.subscribe, but maybe I missing the reason for this and then is the subscribe that might need to be updated.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm good point. Originally I wanted metadata only owned by the background thread so that the ownership is clearer, which also allows us to remove the synchronization blocks.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we wanted to remove as much concurrent access to objects as possible. It wasn't necessarily for performance reasons, I think it was more for removing the complexity of the code. I think the synchronization does have a performance impact, though that's not really the point of the refactoring.

@lianetm

lianetm commented Jul 26, 2023

Copy link
Copy Markdown
Collaborator

Thanks for the changes! Left some comments but LGTM

Update ApplicationEventProcessor.java
@philipnee philipnee changed the title KAFKA-14950: implement assign() and assignment() and resolve some conflicts [ak-cherry-pick]KAFKA-14950: implement assign() and assignment() and resolve some conflicts Jul 28, 2023
@philipnee philipnee merged commit b86efd8 into ctr-staging Jul 28, 2023
@philipnee philipnee deleted the cherry-pick branch July 28, 2023 21:18
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