avoid possible concurrent access inside ensureCorrectWritables()

This commit is contained in:
Chris Lu
2020-11-22 17:15:59 -08:00
parent 92f906b6fc
commit c7ebadc25d
2 changed files with 3 additions and 2 deletions

View File

@@ -141,7 +141,6 @@ func (vl *VolumeLayout) RegisterVolume(v *storage.VolumeInfo, dn *DataNode) {
vl.accessLock.Lock()
defer vl.accessLock.Unlock()
defer vl.ensureCorrectWritables(v.Id)
defer vl.rememberOversizedVolume(v, dn)
if _, ok := vl.vid2location[v.Id]; !ok {