mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
In case lastNode==0, need to set it to -1
Fix https://github.com/chrislusf/seaweedfs/issues/156
This commit is contained in:
parent
30242409f4
commit
418878edce
|
@ -44,9 +44,9 @@ func NewMasterNodes(bootstrapNode string) (mn *MasterNodes) {
|
|||
}
|
||||
func (mn *MasterNodes) reset() {
|
||||
glog.V(4).Infof("Resetting master nodes: %v", mn)
|
||||
if len(mn.nodes) > 1 && mn.lastNode > 0 {
|
||||
if len(mn.nodes) > 1 && mn.lastNode >= 0 {
|
||||
glog.V(0).Infof("Reset master %s from: %v", mn.nodes[mn.lastNode], mn.nodes)
|
||||
mn.lastNode = -mn.lastNode
|
||||
mn.lastNode = -mn.lastNode - 1
|
||||
}
|
||||
}
|
||||
func (mn *MasterNodes) findMaster() (string, error) {
|
||||
|
|
Loading…
Reference in a new issue