mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 07:19:18 +01:00
Revert "Merge pull request #1683 from qieqieplus/master"
This reverts commit8cb67952db, reversing changes made to200e56215a.
This commit is contained in:
1 parent
99990a3c91
commit
986cbdf7d9
1 file changed
+5
-7
@@ -99,14 +99,12 @@ func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind Ne
|
|||||||
}
|
}
|
||||||
|
|
||||||
// avoid loading one volume more than once
|
// avoid loading one volume more than once
|
||||||
l.volumesLock.Lock()
|
l.volumesLock.RLock()
|
||||||
if _, found := l.volumes[vid]; found {
|
_, found := l.volumes[vid]
|
||||||
l.volumesLock.Unlock()
|
l.volumesLock.RUnlock()
|
||||||
|
if found {
|
||||||
glog.V(1).Infof("loaded volume, %v", vid)
|
glog.V(1).Infof("loaded volume, %v", vid)
|
||||||
return true
|
return true
|
||||||
} else {
|
|
||||||
l.volumes[vid] = nil
|
|
||||||
l.volumesLock.Unlock()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the volume
|
// load the volume
|
||||||
@@ -115,7 +113,7 @@ func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind Ne
|
|||||||
glog.V(0).Infof("new volume %s error %s", volumeName, e)
|
glog.V(0).Infof("new volume %s error %s", volumeName, e)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
l.SetVolume(vid, v)
|
l.SetVolume(vid, v)
|
||||||
|
|
||||||
size, _, _ := v.FileStat()
|
size, _, _ := v.FileStat()
|
||||||
|
|||||||
Reference in new issue
Block a user