avoid race conditions for OnPeerUpdate (#3525)

https://github.com/seaweedfs/seaweedfs/issues/3524
This commit is contained in:
Konstantin Lebedev
2022-08-26 22:18:49 +05:00
committed by GitHub
parent 4f7a1f67cd
commit e90ab4ac60
4 changed files with 14 additions and 4 deletions

View File

@@ -116,7 +116,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se
}
ms.boundedLeaderChan = make(chan int, 16)
ms.MasterClient.OnPeerUpdate = ms.OnPeerUpdate
ms.MasterClient.SetOnPeerUpdateFn(ms.OnPeerUpdate)
seq := ms.createSequencer(option)
if nil == seq {