mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 13:54:54 +08:00
1. volume server auto detect clustered master nodes
2. remove operation package dependency on storage
This commit is contained in:
@@ -43,7 +43,7 @@ func NewVolumeServer(r *http.ServeMux, version string, ip string, port int, publ
|
||||
|
||||
go func() {
|
||||
connected := true
|
||||
vs.store.SetMaster(vs.masterNode)
|
||||
vs.store.SetBootstrapMaster(vs.masterNode)
|
||||
vs.store.SetDataCenter(vs.dataCenter)
|
||||
vs.store.SetRack(vs.rack)
|
||||
for {
|
||||
@@ -58,7 +58,11 @@ func NewVolumeServer(r *http.ServeMux, version string, ip string, port int, publ
|
||||
connected = false
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Duration(float32(vs.pulseSeconds*1e3)*(1+rand.Float32())) * time.Millisecond)
|
||||
if connected {
|
||||
time.Sleep(time.Duration(float32(vs.pulseSeconds*1e3)*(1+rand.Float32())) * time.Millisecond)
|
||||
} else {
|
||||
time.Sleep(time.Duration(float32(vs.pulseSeconds*1e3)* 0.25) * time.Millisecond)
|
||||
}
|
||||
}
|
||||
}()
|
||||
glog.V(0).Infoln("store joined at", vs.masterNode)
|
||||
|
Reference in New Issue
Block a user