Skip to content

Reset metadata backoff after a broker connection recovers - #3197

Open
narayana006 wants to merge 1 commit into
dpkp:masterfrom
narayana006:candidate/metadata-backoff-recovery
Open

narayana006 wants to merge 1 commit into
dpkp:masterfrom
narayana006:candidate/metadata-backoff-recovery

Conversation

@narayana006

Copy link
Copy Markdown

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 lint passes. 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.

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.

1 participant