1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-03 07:36:45 +02:00

Revert "Merge pull request #1683 from qieqieplus/master"

This reverts commit 8cb67952db, reversing
changes made to 200e56215a.
This commit is contained in:
Chris Lu 2020-12-17 12:46:20 -08:00
parent 1bf22c0b5b
commit f56e6d231e

View file

@ -101,14 +101,12 @@ func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind Ne
}
// avoid loading one volume more than once
l.volumesLock.Lock()
if _, found := l.volumes[vid]; found {
l.volumesLock.Unlock()
l.volumesLock.RLock()
_, found := l.volumes[vid]
l.volumesLock.RUnlock()
if found {
glog.V(1).Infof("loaded volume, %v", vid)
return true
} else {
l.volumes[vid] = nil
l.volumesLock.Unlock()
}
// load the volume