mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-21 14:02:35 +00:00
drain stashed topology id reports when the id arrives outside the mint path
This commit is contained in:
@@ -30,6 +30,9 @@ func recoverTopologyIdFromState(fsmState []byte, topo *topology.Topology) {
|
||||
// It uses the provided checkLeaderFn to verify leadership and persistFn to save the new ID.
|
||||
func EnsureTopologyId(topo *topology.Topology, checkLeaderFn func() bool, persistFn func(string) error) {
|
||||
if topo.GetTopologyId() != "" {
|
||||
// The id arrived through raft replay or the mirror file; reports
|
||||
// stashed while it was unknown can now be checked.
|
||||
topo.SetTopologyInitPending(false)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user