Repository navigation
Reset metadata backoff after a broker connection recovers - #3197
Open
narayana006 wants to merge 1 commit into
Open
narayana006 wants to merge 1 commit into
narayana006 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When metadata refresh finds no available broker, it enters exponential backoff. A later successful connection resets the broker backoff but leaves the metadata backoff intact, delaying even an explicitly requested refresh. Reset metadata backoff alongside broker backoff after successful initialization, respecting the existing bootstrap opt-out and preserving backoff after connection failures.
Regression tests check the metadata TTL and bootstrap/failure controls. Protocol round trips against MockCluster verify that both selector and asyncio backends obtain changed partition metadata after reconnection without waiting for the previous backoff.
Refs #3188.
Validation: three regression cases fail before the change; two controls pass. With the fix, 585 networking, cluster metadata and consumer-fetch tests pass on macOS/Python 3.11.15, and repository-wide
make lintpasses. The live Docker/broker-restart and FENCED_LEADER_EPOCH scenario, full test suite and broker/Python CI matrix were not run; these tests isolate the metadata-backoff recovery path.AI assistance: OpenAI Codex assisted with investigation, implementation, regression tests and local validation. Publication was explicitly approved by the contributor.