-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
config: convert ZoneConfig to the new format #8627
Conversation
de1d3a7
to
27ecfd1
Compare
// NumReplicas specifies the desired number of replicas | ||
optional int32 num_replicas = 5 [(gogoproto.nullable) = false]; | ||
// Constraints constrains which stores the replicas can be stored on. The | ||
// order in which the constrains are stored is arbitrary and may change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/constrains/constraints/
Review status: 0 of 25 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. config/config.proto, line 69 [r1] (raw file):
|
Reviewed 18 of 25 files at r1, 7 of 7 files at r2. config/config.proto, line 60 [r2] (raw file):
Add config/config.proto, line 74 [r2] (raw file):
A protobuf seems like it's only halfway human-readable, and it looks like we never actually use the proto-ness of ZoneConfigHuman. Should it be a plain struct instead (or make To/FromHuman go all the way to strings)? Or could we put MarshalYAML and UnmarshalYAML methods on the Constraint type to get yaml parsing to work the way we want? config/config.proto, line 86 [r2] (raw file):
Shouldn't this also have the Comments from Reviewable |
Review status: 0 of 27 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending. config/config.proto, line 60 [r2] (raw file):
|
Review status: 0 of 27 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. config/config.proto, line 86 [r2] (raw file):
|
Review status: 0 of 27 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending. config/config.proto, line 86 [r2] (raw file):
|
@bdarnell boop |
Reviewed 2 of 27 files at r3, 25 of 25 files at r4. Comments from Reviewable |
7d7b8d9
to
0f79a94
Compare
Converts ZoneConfig to the new format specified in the expressive ZoneConfig RFC. This is intermediate work on cockroachdb#4868. https://github.com/cockroachdb/cockroach/blob/develop/docs/RFCS/expressive_zone_config.md - Allocator and StorePool use []config.Constraint instead of roachpb.Attributes since the new type allows for different types of constraint. - Adds a `ZoneConfigLegacy` struct for upgrades to the new format. - Adds a `ZoneConfigHuman` struct for easier specification on the command line.
Converts ZoneConfig to the new format specified in the expressive ZoneConfig
RFC. This is intermediate work on #4868.
https://github.com/cockroachdb/cockroach/blob/develop/docs/RFCS/expressive_zone_config.md
since the new type allows for different types of constraint.
ZoneConfigLegacy
struct for upgrades to the new format.ZoneConfigHuman
struct for easier specification on the command line.@petermattis @bdarnell
This change is