-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix leveldb mount bug #642
Conversation
weed/storage/disk_location.go
Outdated
@@ -168,6 +168,7 @@ func (l *DiskLocation) UnloadVolume(vid VolumeId) error { | |||
if !ok { | |||
return fmt.Errorf("Volume not loaded, VolumeId: %d", vid) | |||
} | |||
l.volumes[vid].Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the volume variable ignored at line 167.
fix leveldb mount bug
thanks! |
use leveldb index. but after loading leveldb database, you use Btree statistics zhe deleted file size,wo don't think this is a good way. when I loading 100 million index,Btree will use 3.6G memory,and GC don't work well。 but in my filesystem, don't care the deleted file size, so I ingore the Btree Code. I know the deleted file size will influences Compact. |
Not very clear about what you mean. Maybe let me see what you have changed in code. |
func doLoading(file *os.File, nm NeedleMap, flag bool) (NeedleMap, error) { add parameter flag in function doLoading,if index--->leveldb/boltdb,flag--->flase;other, flag-->true |
as discussed on #642 (comment)
right. need a way to do metrics better. |
index--->leveldb
operation:
unmount volume(vid=3)
mount volume(vid=3)
error:
I0502 16:02:19 03815 disk_location.go:59] new volume 3.dat error resource temporarily unavailable
fix:
add l.volumes[vid].close() in file storage/disk_location.go line 171 before delete(l.volumes, vid);