Skip to content

KAFKA-19300: AsyncConsumer#unsubscribe always timeout due to GroupAuthorizationException #19779

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

Merged
merged 9 commits into from
May 26, 2025

Conversation

Rancho-7
Copy link
Contributor

@Rancho-7 Rancho-7 commented May 21, 2025

jira: https://issues.apache.org/jira/browse/KAFKA-19300

I verified the behavior by rewriting the
GroupAuthorizerIntegrationTest in Java in this PR:
#19685 The state is now correct.

Reviewers: Chia-Ping Tsai [email protected]

@github-actions github-actions bot added triage PRs from the community consumer clients small Small PRs labels May 21, 2025
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@Rancho-7 Could you please add @Timeout to testConsumeUnsubscribeWithoutGroupPermission? With this fix, the elapsed time of the test should be shorter.

@@ -443,7 +443,7 @@ public void transitionToFatal() {
log.error("Member {} with epoch {} transitioned to fatal state", memberId, memberEpoch);
notifyEpochChange(Optional.empty());

if (previousState == MemberState.UNSUBSCRIBED) {
if (previousState == MemberState.UNSUBSCRIBED && maybeCompleteLeaveInProgress()) {
Copy link
Member

Choose a reason for hiding this comment

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

I think StreamsMembershipManager needs this change as well. cc @mjsax

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Thanks for the suggestion!

Copy link
Member

Choose a reason for hiding this comment

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

I notice some different behavior between async and stream (https://github.com/apache/kafka/pull/18551/files#r2106243432). Maybe we can open a ticket to log it instead of changing it right now. This PR can fix the actual issue in Async consumer, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, I have opened https://issues.apache.org/jira/browse/KAFKA-19333 to track this.

@github-actions github-actions bot added core Kafka Broker and removed triage PRs from the community labels May 21, 2025
@chia7712
Copy link
Member

@Rancho-7 please check the failed test

@@ -480,6 +480,7 @@ public void transitionToFatal() {
if (previousState == MemberState.UNSUBSCRIBED) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you please consider modifying the unit test to keep the production code consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated it.

@chia7712 chia7712 merged commit 0600abd into apache:trunk May 26, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants