fix concurrent map reads

This commit is contained in:
Chris Lu 2021-01-31 18:26:26 -08:00
parent 314dc1c957
commit 1102ae32c4

View file

@ -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
}