Skip to content

[server] Restore KV minRetainOffset on follower restart - #4060

Draft
gyang94 wants to merge 2 commits into
apache:mainfrom
gyang94:codex/issue-4054-startup-restore
Draft

[server] Restore KV minRetainOffset on follower restart#4060
gyang94 wants to merge 2 commits into
apache:mainfrom
gyang94:codex/issue-4054-startup-restore

Conversation

@gyang94

@gyang94 gyang94 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restore follower minRetainOffset from the latest committed KV snapshot when KV followers are handled in makeFollowers.
  • Coalesce pending restores into one asynchronous task per TabletServer, keeping ZooKeeper access outside the replica state-change lock.
  • Bound ZooKeeper pressure with 32-bucket client batches, the configured max-inflight limit, startup jitter, and exponential retry backoff.
  • Distinguish confirmed-empty snapshots from unresolved reads, and ignore stale results after notifications, role changes, replica replacement, or shutdown.
  • Fixes [server] Restore KV minRetainOffset on follower restart #4054

Test Plan

  • ZooKeeperClientTest: 23 tests passed.
  • ReplicaManagerTest: 41 tests passed.
  • mvn -o -pl fluss-server -DskipTests -Dfast verify passed (Checkstyle 0 violations and Spotless passed).

🤖 AI-assisted changes - reviewed by human developer

gyang94 and others added 2 commits August 21, 2026 17:07
Restore follower min retain offsets from the latest committed KV snapshots during startup. Batch and throttle ZooKeeper reads, retry unresolved buckets with jittered backoff, and stop restoration safely during shutdown.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-5.6-sol
AI-Contributed/Feature: 461/461
AI-Contributed/UT: 208/208
Collect KV followers directly in makeFollowers and coalesce startup restores through one asynchronous TabletServer task. Keep ZooKeeper reads batched and retry unresolved buckets with backoff.

Co-Authored-By: Codex <noreply@openai.com>

AI-Model: gpt-5.6-sol

AI-Contributed/Feature: 452/452

AI-Contributed/UT: 23/23
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.

[server] Restore KV minRetainOffset on follower restart

1 participant