aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2018-05-02 21:38:11 -0700
committerGitHub <noreply@github.com>2018-05-02 21:38:11 -0700
commit63c4884b16f8762174038f163e96800aa609faca (patch)
treef62fdf8754b29f10f24a0a0dd878138842798865
parent230258702f58a7fdc60d126ff4e3ed493cf9cd04 (diff)
parentb9068c13040918091fd5e4ad978be3ca227b8a29 (diff)
downloadseaweedfs-63c4884b16f8762174038f163e96800aa609faca.tar.xz
seaweedfs-63c4884b16f8762174038f163e96800aa609faca.zip
Merge pull request #642 from whynotAC/master
fix leveldb mount bug
-rw-r--r--weed/storage/disk_location.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go
index 99c4f3c34..9589d9281 100644
--- a/weed/storage/disk_location.go
+++ b/weed/storage/disk_location.go
@@ -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
}