Skip to content

KAFKA-20860: Retry consumer reconciliation after synchronous failure - #23023

Open
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-20860-retry-reconciliation
Open

KAFKA-20860: Retry consumer reconciliation after synchronous failure#23023
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-20860-retry-reconciliation

Conversation

@lh0156

@lh0156 lh0156 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • Reset the reconciliation-in-progress latch when synchronous reconciliation setup fails.
  • Handle synchronous failures while starting revocation and assignment without breaking the consumer background loop.
  • Add regression coverage proving the next reconciliation loop retries successfully.

Motivation

A RuntimeException thrown after reconciliation starts but before its asynchronous future chain is established can leave the membership manager permanently stuck because reconciliationInProgress remains true. This change treats that setup failure as a failed attempt, preserves the existing auto-commit failure behavior, and allows the next poll to retry.

Testing

  • ./gradlew :clients:test --tests org.apache.kafka.clients.consumer.internals.ConsumerMembershipManagerTest
  • ./gradlew :clients:test --tests org.apache.kafka.clients.consumer.internals.ConsumerMembershipManagerTest --tests org.apache.kafka.clients.consumer.internals.StreamsMembershipManagerTest --tests org.apache.kafka.clients.consumer.internals.ShareMembershipManagerTest
  • ./gradlew :clients:check --no-build-cache --console=plain

Fixes KAFKA-20860

Reviewers: Lianet Magrans lmagrans@confluent.io

Ensure a synchronous exception during reconciliation setup does not leave the membership manager permanently blocked. Preserve commit failure handling while allowing the next reconciliation loop to retry.

Generated-by: OpenAI Codex (GPT-5)
@github-actions github-actions Bot added triage PRs from the community consumer clients labels Aug 2, 2026
@lianetm

lianetm commented Aug 6, 2026

Copy link
Copy Markdown
Member

Thanks for looking into this @lh0156 ! I left a comment in jira mentioning how I don't see how this could be reachable. Am I missing a case where we could indeed have such "sync failure" in that section of the code? Or was the motivation here just to be defensive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients consumer triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants