Ask the metaserver which node leads, and where it is - #468
Open
bjmeetsfo wants to merge 2 commits into
Open
Conversation
The raft status answers with a leader id and nothing else. The node addresses are configured, validated for being present and distinct, and then reported nowhere -- not on the status, not on any node in it. A number is not somewhere to send a request, so an operator holding a list of metaservers had no way to find which one accepts changes except to try each and read the failures. GET /meta/raft/leader now answers with the leader's id, the address it was configured with, and whether this process is that node -- so a caller can tell it has already arrived. A metaserver that is not raft-backed says raft_disabled rather than naming a leader it does not have, and one whose leader has no configured address says leader_unavailable rather than an empty string that reads like an answer. Worth reading alongside the note that a metaserver raft group is built inside one process: this says which node leads that group, which is the question an operator asks first, and the answer is now available rather than inferred.
# Conflicts: # crates/temporalstore-rust/src/bin/metaserver.rs
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.
The raft status answers with a leader id and nothing else. The node
addresses are configured, validated for being present and distinct, and then
reported nowhere -- not on the status, not on any node in it. A number is
not somewhere to send a request, so an operator holding a list of
metaservers had no way to find which one accepts changes except to try each
and read the failures.
GET /meta/raft/leader now answers with the leader's id, the address it was
configured with, and whether this process is that node -- so a caller can
tell it has already arrived.
A metaserver that is not raft-backed says raft_disabled rather than naming a
leader it does not have, and one whose leader has no configured address says
leader_unavailable rather than an empty string that reads like an answer.
Worth reading alongside the note that a metaserver raft group is built
inside one process: this says which node leads that group, which is the
question an operator asks first, and the answer is now available rather than
inferred.