diff --git a/weed/server/raft_server.go b/weed/server/raft_server.go index 17b1f51b2..ca1792ac6 100644 --- a/weed/server/raft_server.go +++ b/weed/server/raft_server.go @@ -14,7 +14,6 @@ import ( "github.com/chrislusf/raft" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/topology" - "github.com/chrislusf/seaweedfs/weed/util" "github.com/gorilla/mux" ) @@ -72,7 +71,6 @@ func NewRaftServer(r *mux.Router, peers []string, httpAddr string, dataDir strin for _, peer := range s.peers { s.raftServer.AddPeer(peer, "http://"+peer) } - rand.Seed(util.HashBytesToInt64([]byte(httpAddr))) time.Sleep(time.Duration(1000+rand.Int31n(3000)) * time.Millisecond) if s.raftServer.IsLogEmpty() { // Initialize the server by joining itself. diff --git a/weed/util/randomizer.go b/weed/util/randomizer.go deleted file mode 100644 index e5ccd3fb3..000000000 --- a/weed/util/randomizer.go +++ /dev/null @@ -1,9 +0,0 @@ -package util - -import "hash/fnv" - -func HashBytesToInt64(x []byte) int64 { - hash := fnv.New64() - hash.Write(x) - return int64(hash.Sum64()) -}