Skip to content

Ask the metaserver which node leads, and where it is - #468

Open
bjmeetsfo wants to merge 2 commits into
mainfrom
oss/ask-the-metaserver-which-node-leads
Open

Ask the metaserver which node leads, and where it is#468
bjmeetsfo wants to merge 2 commits into
mainfrom
oss/ask-the-metaserver-which-node-leads

Conversation

@bjmeetsfo

Copy link
Copy Markdown
Collaborator

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.

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.
@bjmeetsfo
bjmeetsfo requested a review from superhaiou as a code owner August 30, 2026 08:50
# Conflicts:
#	crates/temporalstore-rust/src/bin/metaserver.rs
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.

2 participants