Browse Source
use volumes variable
fix leveldb mount bug
pull/642/head
WenLong LI
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
weed/storage/disk_location.go
|
|
@ -164,11 +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) |
|
|
|
} |
|
|
|
l.volumes[vid].Close() |
|
|
|
v.Close() |
|
|
|
delete(l.volumes, vid) |
|
|
|
return nil |
|
|
|
} |
|
|
|