Repository navigation
fix(coordination): source self aux from startup config in SHOW INSTANCE - #4911
Merged
Merged
Conversation
The cluster config received from the leader may not yet contain the joining coordinator, so looking up self aux in it could fail and abort the process. Read it from the state manager's own srv_config instead.
as51340
marked this pull request as ready for review
September 23, 2026 13:26
andrejtonev
approved these changes
Sep 25, 2026
Contributor
Author
Tracking
Standard development
CI Testing Labels
Documentation checklist
|
66 of 75 tasks
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.
SHOW INSTANCEon a coordinator that is in the middle of joining the cluster aborted the process with:Root cause
RaftState::GetMyCoordinatorInstanceAuxsearched the NuRaft cluster config for this coordinator's own entry and asserted when it was missing. That entry is not guaranteed to be there.CoordinatorStateManagerseeds a one-member config containing itself in the constructor, but that is only NuRaft's bootstrap for a fresh server. Bothsave_configandTryUpdateClusterConfigFromDiskreplacecluster_config_wholesale instead of merging into it, so the seeded self entry lives only until the first real config arrives.For a joining coordinator the flow is:
ADD COORDINATORthe leader sends a join request carrying its current membership. The follower accepts it and NuRaft callssave_configwith that config. It contains the leader and existing coordinators but not the follower, so the self entry disappears in memory and on disk.save_configruns again and self is back.Between steps 2 and 4
SHOW INSTANCEhit the assertion. A restart inside that window reloads the step 2 config from disk, so the window survives restarts until step 4 completes. Only a follower can hit this, the leader's config always contains itself.Fix
The state manager keeps its startup network config in
my_srv_config_, which is never overwritten. It is exactly whatSHOW INSTANCEdisplays and whatAddSelfCoordinatorcompares the query against, so self aux is now read from there and no longer depends on the cluster config.CoordinatorStateManager::GetMyCoordinatorInstanceAuxadded, backed bymy_srv_config_; aux parsing shared viaParseAux.RaftState::GetMyCoordinatorInstanceAuxdelegates to it, the assertion is removed.