mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 10:17:24 +08:00
Fix a race condition when handle VolumeLocationList
This commit is contained in:
@@ -165,7 +165,7 @@ func vacuumOneVolumeLayout(grpcDialOption grpc.DialOption, volumeLayout *VolumeL
|
||||
volumeLayout.accessLock.RLock()
|
||||
tmpMap := make(map[needle.VolumeId]*VolumeLocationList)
|
||||
for vid, locationList := range volumeLayout.vid2location {
|
||||
tmpMap[vid] = locationList
|
||||
tmpMap[vid] = locationList.Copy()
|
||||
}
|
||||
volumeLayout.accessLock.RUnlock()
|
||||
|
||||
|
Reference in New Issue
Block a user