Skip to content

[server] Parallelize replica leader transitions - #3999

Open
zuston wants to merge 1 commit into
apache:mainfrom
zuston:makeleader
Open

[server] Parallelize replica leader transitions#3999
zuston wants to merge 1 commit into
apache:mainfrom
zuston:makeleader

Conversation

@zuston

@zuston zuston commented Aug 14, 2026

Copy link
Copy Markdown
Member

Purpose

This PR speeds up replica leader transitions by processing independent buckets concurrently within a NotifyLeaderAndIsr request.
Previously, ReplicaManager.makeLeaders() transitioned replicas sequentially. This could significantly increase request latency when multiple replicas became leaders together, especially for primary-key tables where leader initialization may involve restoring RocksDB state from remote snapshots and replaying logs.

Brief change log

Introduce the option of tablet-server.replica-transition-thread-num to control concurrency, with a default value of 10.

And in the first phase of this PR, we haven't involve the makeFollowers into the backgroud thread pools.

Tests

API and Format

Documentation

@zuston

zuston commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

could you help review this? @fresh-borzoni

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