Skip to content
Snippets Groups Projects
Unverified Commit f1803442 authored by Manish R Jain's avatar Manish R Jain
Browse files

Fix wording and check for negative number of replicas.

parent 86925645
No related branches found
No related tags found
No related merge requests found
...@@ -141,10 +141,11 @@ func run() { ...@@ -141,10 +141,11 @@ func run() {
rebalanceInterval: Zero.Conf.GetDuration("rebalance_interval"), rebalanceInterval: Zero.Conf.GetDuration("rebalance_interval"),
} }
if opts.numReplicas % 2 == 0 { if opts.numReplicas < 0 || opts.numReplicas%2 == 0 {
log.Fatalf("Invalid flag value --replicas=%d - number of replicas cannot be divisible by 2", opts.numReplicas) log.Fatalf("ERROR: Number of replicas must be odd for consensus. Found: %d",
opts.numReplicas)
} }
if Zero.Conf.GetBool("expose_trace") { if Zero.Conf.GetBool("expose_trace") {
trace.AuthRequest = func(req *http.Request) (any, sensitive bool) { trace.AuthRequest = func(req *http.Request) (any, sensitive bool) {
return true, true return true, true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment