mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-18 20:18:27 +02:00
avoid nil locations
fix https://github.com/chrislusf/seaweedfs/issues/2059
This commit is contained in:
1 parent
da0a4e775b
commit
9a6aa00e9d
1 file changed
+6
-1
@@ -49,7 +49,12 @@ func (t *Topology) SetVolumeCapacityFull(volumeInfo *storage.VolumeInfo) bool {
|
||||
vl.accessLock.RLock()
|
||||
defer vl.accessLock.RUnlock()
|
||||
|
||||
for _, dn := range vl.vid2location[volumeInfo.Id].list {
|
||||
vidLocations, found := vl.vid2location[volumeInfo.Id]
|
||||
if !found {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, dn := range vidLocations.list {
|
||||
if !volumeInfo.ReadOnly {
|
||||
|
||||
disk := dn.getOrCreateDisk(volumeInfo.DiskType)
|
||||
|
||||
Reference in new issue
Block a user