From a067deaabcf9b7d6feb58e13dda24721da3e153e Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 28 Sep 2021 16:54:18 -0700 Subject: [PATCH] avoid possible modified location list fix issue 1 of https://github.com/chrislusf/seaweedfs/issues/2345 --- weed/topology/volume_layout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go index f315cb7e4..db05102fe 100644 --- a/weed/topology/volume_layout.go +++ b/weed/topology/volume_layout.go @@ -302,7 +302,7 @@ func (vl *VolumeLayout) PickForWrite(count uint64, option *VolumeGrowOption) (*n } counter++ if rand.Intn(counter) < 1 { - vid, locationList = v, volumeLocationList + vid, locationList = v, volumeLocationList.Copy() } } }