We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8692564 commit f180344Copy full SHA for f180344
dgraph/cmd/zero/run.go
@@ -141,10 +141,11 @@ func run() {
141
rebalanceInterval: Zero.Conf.GetDuration("rebalance_interval"),
142
}
143
144
- if opts.numReplicas % 2 == 0 {
145
- log.Fatalf("Invalid flag value --replicas=%d - number of replicas cannot be divisible by 2", opts.numReplicas)
+ if opts.numReplicas < 0 || opts.numReplicas%2 == 0 {
+ log.Fatalf("ERROR: Number of replicas must be odd for consensus. Found: %d",
146
+ opts.numReplicas)
147
-
148
+
149
if Zero.Conf.GetBool("expose_trace") {
150
trace.AuthRequest = func(req *http.Request) (any, sensitive bool) {
151
return true, true
0 commit comments