diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-09-28 16:54:18 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-09-28 16:54:18 -0700 |
| commit | a067deaabcf9b7d6feb58e13dda24721da3e153e (patch) | |
| tree | 0eccce237529939c5761576a8466b185cd0bf70a | |
| parent | 040443e2d1c9dd5959bfe0acd346c555c9f3d559 (diff) | |
| download | seaweedfs-a067deaabcf9b7d6feb58e13dda24721da3e153e.tar.xz seaweedfs-a067deaabcf9b7d6feb58e13dda24721da3e153e.zip | |
avoid possible modified location list
fix issue 1 of https://github.com/chrislusf/seaweedfs/issues/2345
| -rw-r--r-- | weed/topology/volume_layout.go | 2 |
1 files changed, 1 insertions, 1 deletions
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() } } } |
