dain / leveldb

Port of LevelDB to Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File Partitioning

leosabbir opened this issue · comments

Well this is not really an issue. I want to know if there is this feature.

When adding data to database, the file is going to grow size. If the size grows huge, is there the feature of file splitting? will the db be save in different files?

as you konw,levelDb contains many levels. In each level,it will send the data to next level when this level is full .
just like that, if memtable(first level) 's size is bigger than Options.writeBufferSize it will flush to the secondary level.
if the secondary level 's file num is bigger than 4 ,it will flush to the third level.
if the third level 's file size is bigger than 10 * 1048576 (default ,i forget whether the value is right ,it does not matter ),it will flush the data to the next level.