mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 03:53:34 +08:00
randomize raft server startup
also some go fmt
This commit is contained in:
@@ -2,6 +2,7 @@ package command
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
@@ -19,7 +20,6 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/chrislusf/seaweedfs/weed/wdclient"
|
||||
"context"
|
||||
)
|
||||
|
||||
type BenchmarkOptions struct {
|
||||
|
@@ -132,7 +132,7 @@ func checkPeers(masterIp string, masterPort int, peers string) (masterAddress st
|
||||
if !hasSelf {
|
||||
peerCount += 1
|
||||
}
|
||||
if peerCount %2 == 0 {
|
||||
if peerCount%2 == 0 {
|
||||
glog.Fatalf("Only odd number of masters are supported!")
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user