leveldb icon indicating copy to clipboard operation
leveldb copied to clipboard

open db oom error when the database has a large manifest file

Open halibobo1205 opened this issue 3 years ago • 2 comments

hi, due to the manifest file rewrite when db is reopen, the db is running a very long time, manifest file grew up 4.3G.when i reopen the db, versionset.recover cause a oom error because of this Builder /**

  • A helper class so we can efficiently apply a whole sequence
  • of edits to a particular state without creating intermediate
  • Versions that contain full copies of the intermediate state. */ can this manifest deal with batch? image image

halibobo1205 avatar Jul 14 '21 08:07 halibobo1205

Batch could be an option, but I think we can try to find a better way to deal with it without creating multiple versions. In this scenario most of the files in the manifest are from files that where already merged and deleted. Beware that manifest may grow in size with the number of files but also with the size of keys used (smallest/largest).

pcmind avatar Jul 15 '21 13:07 pcmind

I test it use goleveldb, it very fast,but use goleveldb open an c++ leveldb db, it will lost xxx .log data, this cloud be goleveldb has special manifest deal . rocksdb can check manifest size whenever append.

halibobo1205 avatar Jul 16 '21 02:07 halibobo1205