[server] Support DescribeTabletServers API for safe scaling and upgrades#3743
Open
morazow wants to merge 1 commit into
Open
[server] Support DescribeTabletServers API for safe scaling and upgrades#3743morazow wants to merge 1 commit into
morazow wants to merge 1 commit into
Conversation
morazow
force-pushed
the
describe-tablet-servers-3570
branch
2 times, most recently
from
July 23, 2026 06:40
8df1402 to
b3d64f5
Compare
…upgrades Add a read-only DescribeTabletServers RPC to the Coordinator, following the pattern of GetClusterHealth (apache#3399). It returns, per tablet server, the same four counters getClusterHealth() reports cluster-wide, scoped to that server: numReplicas, inSyncReplicas, numLeaderReplicas and activeLeaderReplicas. This lets operational tooling (e.g. the Fluss Kubernetes Operator): - gate scale-in on a server being empty (numReplicas == 0), - gate rolling upgrades on a per-server green predicate (inSyncReplicas == numReplicas && activeLeaderReplicas == numLeaderReplicas), - report per-server tablet load in cluster status. The counters are computed from in-memory CoordinatorContext state on the coordinator event thread via AccessContextEvent. Tablet servers forward the request to the coordinator. Live and shutting-down servers are always reported, even with zero replicas, and dead servers that still hold assigned replicas remain visible so a scale-in gate cannot treat them as drained. Closes apache#3570
morazow
force-pushed
the
describe-tablet-servers-3570
branch
from
July 23, 2026 12:20
b3d64f5 to
2aad05f
Compare
morazow
marked this pull request as ready for review
July 23, 2026 14:12
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.
Summary
DescribeTabletServersRPC to the Coordinator, following the pattern ofGetClusterHealth([server] Support Cluster Health API for safe rolling upgrades #3399 / [server] Add Cluster Health API implementation #3400).Admin.describeTabletServers()(@PublicEvolving) returns, per tablet server, the same four countersgetClusterHealth()reports cluster-wide, scoped to that server:numReplicas,inSyncReplicas,numLeaderReplicas,activeLeaderReplicas.CoordinatorContextstate on the coordinator event thread (viaAccessContextEvent); tablet servers forward the request to the coordinator over the internal listener.serverGreen(serverId)rolling-upgrade gate, the scale-in safety gate (numReplicas == 0), and per-server tablet load reporting.Fixes #3570
Test Plan
DescribeTabletServersTest(fluss-server) covering: empty cluster, full ISR, out-of-ISR replicas, inactive leaders, leaderless buckets, evacuated servers, dead-but-assigned servers, partitioned tables, and reconciliation of per-server sums withcomputeClusterHealth.FlussAdminITCase#testDescribeTabletServersDuringRollingUpgrade: healthy cluster is green and sums match cluster health; a stopped server stays reported, non-empty and non-green; after restart all servers become green again.mvn spotless:checkclean on fluss-rpc, fluss-server, fluss-client, fluss-flink-common.🤖 AI-assisted changes - reviewed by human developer