aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-01-31 18:26:26 -0800
committerChris Lu <chris.lu@gmail.com>2021-01-31 18:26:26 -0800
commit1102ae32c4012f37fe4ce6d31758f8802f9e644d (patch)
tree22be8dad05cfc46f3312393a0f6f95efe7d25021
parent314dc1c957041501349fa731e21148c7e93d0006 (diff)
downloadseaweedfs-1102ae32c4012f37fe4ce6d31758f8802f9e644d.tar.xz
seaweedfs-1102ae32c4012f37fe4ce6d31758f8802f9e644d.zip
fix concurrent map reads
-rw-r--r--weed/topology/volume_layout.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go
index 0db95d289..e2d6c170c 100644
--- a/weed/topology/volume_layout.go
+++ b/weed/topology/volume_layout.go
@@ -218,7 +218,7 @@ func (vl *VolumeLayout) ensureCorrectWritables(vid needle.VolumeId) {
func (vl *VolumeLayout) isAllWritable(vid needle.VolumeId) bool {
for _, dn := range vl.vid2location[vid].list {
- if v, found := dn.volumes[vid]; found {
+ if v, getError := dn.GetVolumesById(vid); getError == nil {
if v.ReadOnly {
return false
}