Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review table_status format #4196

Closed
timmaxw opened this issue May 6, 2015 · 7 comments
Closed

Review table_status format #4196

timmaxw opened this issue May 6, 2015 · 7 comments
Assignees
Milestone

Comments

@timmaxw
Copy link
Member

timmaxw commented May 6, 2015

The current table_status format in Raft is kind of awkward. We should think about improving it. One idea is to eliminate the state arrays by just choosing the most conservative state.

@danielmewes
Copy link
Member

👍 on

One idea is to eliminate the state arrays by just choosing the most conservative state.

The second thing worth discussing is if we should turn the primary_replicas array for a given shard back into a single value somehow.
I'm not aware of a good way of doing that, so possibly not.

@timmaxw
Copy link
Member Author

timmaxw commented May 12, 2015

OK. I think should display whichever state is earliest in the following list: backfilling, waiting_for_quorum, waiting_for_primary, transitioning, ready, nothing. If a replica would display the nothing state then we'll simply hide it instead. There's one more state (disconnected) but it can never occur in conjunction with any other state, so it doesn't have a meaningful position in the list.

Rationale: backfilling has a performance impact so we should display it whenever it's happening. waiting_for_quorum can cause another machine to be waiting_for_primary, so we should prioritize displaying waiting_for_quorum to make it clear why the primary is stuck. transitioning is the least informative error condition, so we shouldn't display it at all unless it's the only thing keeping us from being ready.

@danielmewes
Copy link
Member

That ordering sounds very reasonable.

@VeXocide
Copy link
Member

I agree, the ordering sounds great. Turning the primary_replicas array into a single value is probably hard -- I don't see a good way of going about it either.

@VeXocide VeXocide self-assigned this May 18, 2015
@VeXocide
Copy link
Member

In CR 2894 by @timmaxw.

@deontologician
Copy link
Contributor

I realize this is an issue about parts of a shard being in multiple states and not wanting to show that as an array because it's confusing, but it might be reasonable to use an array for the state to allow things like state: ["backfilling", "ready"] where we indicate it's ready but may have degraded performance due to backfilling.

This allows clients to just look for the presence of the "ready" state, rather than have to mirror the logic of the state ordering to determine if a shard is ready. It also means if we add new possible states in the future, the client logic wouldn't need to be updated (i.e. looser coupling to exactly which states we use internally and their ordering).

@VeXocide
Copy link
Member

Merged into raft via commit eea2c57.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants