Skip to content

KAFKA-15276: Implement event plumbing for ConsumerRebalanceListener callbacks#14640

Merged
dajac merged 85 commits intoapache:trunkfrom
kirktrue:KAFKA-15276-partition-reconciliation
Dec 15, 2023
Merged

KAFKA-15276: Implement event plumbing for ConsumerRebalanceListener callbacks#14640
dajac merged 85 commits intoapache:trunkfrom
kirktrue:KAFKA-15276-partition-reconciliation

Conversation

@kirktrue
Copy link
Copy Markdown
Contributor

@kirktrue kirktrue commented Oct 25, 2023

Added logic for coordinating the invocation of the ConsumerRebalanceListener callback invocations between the background thread (in MembershipManagerImpl) and the application thread (AsyncKafkaConsumer) and back again.

This allowed us to enable more tests from PlaintextConsumerTest to exercise the code herein.

Added logic for reconciling partition assignment between the target assignment provided by the group coordinator and the current assignment as specified in the SubscriptionState.

This refactors the ConsumerRebalanceListener code from ConsumerCoordinator for reuse in both places.
@kirktrue kirktrue marked this pull request as draft October 30, 2023 21:48
@kirktrue
Copy link
Copy Markdown
Contributor Author

@philipnee Can you add the KIP-848 label, please 🥺

@philipnee philipnee added the KIP-848 The Next Generation of the Consumer Rebalance Protocol label Oct 31, 2023
@kirktrue kirktrue changed the title KAFKA-15276: Implement partition assignment reconciliation KAFKA-15276: Implement event plumbing for ConsumerRebalanceListener callbacks Nov 15, 2023
@dajac
Copy link
Copy Markdown
Member

dajac commented Dec 14, 2023

@kirktrue The last build has compilation errors. Could you please check?

@kirktrue
Copy link
Copy Markdown
Contributor Author

@kirktrue The last build has compilation errors. Could you please check?

Fixed.

Oddly I couldn't get it to break locally until I re-sync'ed my fork and merged in trunk 🤷‍♂️

@kirktrue
Copy link
Copy Markdown
Contributor Author

Build failed because code couldn't be git clone-ed. Closing and reopening.

@kirktrue kirktrue closed this Dec 14, 2023
@kirktrue kirktrue reopened this Dec 14, 2023
@kirktrue
Copy link
Copy Markdown
Contributor Author

Build failed yet again because code couldn't be git clone-ed. Closing and reopening.

@kirktrue kirktrue closed this Dec 14, 2023
@kirktrue kirktrue reopened this Dec 14, 2023
@kirktrue
Copy link
Copy Markdown
Contributor Author

Closing and reopening due to Jenkins fussiness:

ERROR: Cannot resume build because FlowNode 88 for FlowHead 1 could not be loaded. This is expected to happen when using the PERFORMANCE_OPTIMIZED durability setting and Jenkins is not shut down cleanly. Consider investigating to understand if Jenkins was not shut down cleanly or switching to the MAX_SURVIVABILITY durability setting which should prevent this issue in most cases.

@kirktrue kirktrue closed this Dec 14, 2023
@kirktrue kirktrue reopened this Dec 14, 2023
Copy link
Copy Markdown
Member

@dajac dajac left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the PR, @kirktrue. It would be great if we could follow-up on the comments regarding the testing. Could you take care of those?

@dajac dajac merged commit 9dc9040 into apache:trunk Dec 15, 2023
dajac pushed a commit that referenced this pull request Dec 15, 2023
…allbacks (#14640)

This patch adds the logic for coordinating the invocation of the `ConsumerRebalanceListener` callback invocations between the background thread (in `MembershipManagerImpl`) and the application thread (`AsyncKafkaConsumer`) and back again. It allowed us to enable more tests from `PlaintextConsumerTest` to exercise the code herein.

Reviewers: David Jacot <djacot@confluent.io>
@dajac
Copy link
Copy Markdown
Member

dajac commented Dec 15, 2023

The failed tests are not related. Merged it to trunk and 3.7.

gaurav-narula pushed a commit to gaurav-narula/kafka that referenced this pull request Jan 24, 2024
…allbacks (apache#14640)

This patch adds the logic for coordinating the invocation of the `ConsumerRebalanceListener` callback invocations between the background thread (in `MembershipManagerImpl`) and the application thread (`AsyncKafkaConsumer`) and back again. It allowed us to enable more tests from `PlaintextConsumerTest` to exercise the code herein.

Reviewers: David Jacot <djacot@confluent.io>
yyu1993 pushed a commit to yyu1993/kafka that referenced this pull request Feb 15, 2024
…allbacks (apache#14640)

This patch adds the logic for coordinating the invocation of the `ConsumerRebalanceListener` callback invocations between the background thread (in `MembershipManagerImpl`) and the application thread (`AsyncKafkaConsumer`) and back again. It allowed us to enable more tests from `PlaintextConsumerTest` to exercise the code herein.

Reviewers: David Jacot <djacot@confluent.io>
AnatolyPopov pushed a commit to aiven/kafka that referenced this pull request Feb 16, 2024
…allbacks (apache#14640)

This patch adds the logic for coordinating the invocation of the `ConsumerRebalanceListener` callback invocations between the background thread (in `MembershipManagerImpl`) and the application thread (`AsyncKafkaConsumer`) and back again. It allowed us to enable more tests from `PlaintextConsumerTest` to exercise the code herein.

Reviewers: David Jacot <djacot@confluent.io>
@kirktrue kirktrue deleted the KAFKA-15276-partition-reconciliation branch February 16, 2024 17:54
clolov pushed a commit to clolov/kafka that referenced this pull request Apr 5, 2024
…allbacks (apache#14640)

This patch adds the logic for coordinating the invocation of the `ConsumerRebalanceListener` callback invocations between the background thread (in `MembershipManagerImpl`) and the application thread (`AsyncKafkaConsumer`) and back again. It allowed us to enable more tests from `PlaintextConsumerTest` to exercise the code herein.

Reviewers: David Jacot <djacot@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer KIP-848 The Next Generation of the Consumer Rebalance Protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants