mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-06-28 15:41:13 +08:00
Fix "no more writable volumes" error when volume grows and master leader changed at the same time (#5771)
This commit is contained in:
parent
e8537d7172
commit
cb5dae0c9c
@ -27,9 +27,13 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
||||
break
|
||||
}
|
||||
|
||||
option := req.Option
|
||||
vl := ms.Topo.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.DiskType)
|
||||
|
||||
if !ms.Topo.IsLeader() {
|
||||
//discard buffered requests
|
||||
time.Sleep(time.Second * 1)
|
||||
vl.DoneGrowRequest()
|
||||
continue
|
||||
}
|
||||
|
||||
@ -42,9 +46,6 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
||||
return !found
|
||||
})
|
||||
|
||||
option := req.Option
|
||||
vl := ms.Topo.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.DiskType)
|
||||
|
||||
// not atomic but it's okay
|
||||
if !found && vl.ShouldGrowVolumes(option) {
|
||||
filter.Store(req, nil)
|
||||
|
Loading…
Reference in New Issue
Block a user