Skip to content

[test] Wait for local leader readiness - #4053

Open
wuchong wants to merge 1 commit into
apache:mainfrom
wuchong:fix/4052-wait-local-leader-ready
Open

[test] Wait for local leader readiness#4053
wuchong wants to merge 1 commit into
apache:mainfrom
wuchong:fix/4052-wait-local-leader-ready

Conversation

@wuchong

@wuchong wuchong commented Aug 20, 2026

Copy link
Copy Markdown
Member

Purpose

Linked issue: close #4052

LogFetcherITCase#testFetchWithSchemaChange failed in this CI job because waitAndGetLeader returned the ZooKeeper-assigned leader before that TabletServer had completed its local leader transition. The test could then send a leader-only request too early and receive an error response without base_offset.

Brief change log

  • Make FlussClusterExtension#waitAndGetLeader wait for both the ZooKeeper leader assignment and the corresponding locally ready leader replica.
  • Document the stronger readiness guarantee.

Tests

  • ./mvnw -pl fluss-client -am -Dtest=LogFetcherITCase#testFetchWithSchemaChange -Dsurefire.failIfNoSpecifiedTests=false test

API and Format

No API or format changes.

Documentation

No documentation changes.

Generative AI disclosure

  • Yes — Codex (gpt-5.6-sol). All changes were reviewed before submission.

Ensure waitAndGetLeader does not return until the assigned replica has completed its local leader transition.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-5.6-sol
AI-Contributed/Feature: 0/0
AI-Contributed/UT: 15/15
@wuchong
wuchong marked this pull request as ready for review August 20, 2026 04:28
@wuchong
wuchong requested a review from swuferhong August 20, 2026 04:28
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.

[test] waitAndGetLeader may return before local leader is ready

1 participant