Merge pull request #642 from whynotAC/master

fix leveldb mount bug
This commit is contained in:
Chris Lu 2018-05-02 21:38:11 -07:00 committed by GitHub
commit 63c4884b16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,10 +164,11 @@ func (l *DiskLocation) UnloadVolume(vid VolumeId) error {
l.Lock()
defer l.Unlock()
_, ok := l.volumes[vid]
v, ok := l.volumes[vid]
if !ok {
return fmt.Errorf("Volume not loaded, VolumeId: %d", vid)
}
v.Close()
delete(l.volumes, vid)
return nil
}