46

LevelDB:Compaction - 简书

 6 years ago
source link: https://www.jianshu.com/p/527c3a00f79e?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
农历新年的最后一天,趁着假期看看代码,顺便做点笔记。时间上比较仓促,如有问题/疑问,欢迎指出。 简介 LevelDB 的写操作是 Append-Only 的,新的数据写入后,相应的旧数据就过期了。过期的数据需要被 Garbage Collection,不然数据文件的体积会持续膨胀,这是不可接受的。 LevelDB 通过后台线程的 compation 来对过期数据进行 Garbage Coll...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK