kyotocabinet

In Kyoto Cabinet Database using File Hash Database, how can avoid file size increasing?

空扰寡人 提交于 2019-12-05 01:43:10
问题 I am using the follow to open: db.open("db.kch#tune_defrag=10000", DB.OWRITER | DB.OCREATE) I am putting and removing elements. At the end of execution, the database is "empty", the count() function returns 0, because I remove all elements. Why the file size always increase when I repeat the test? Is it possible to run something like "garbage collector" to clean the removed registers? If I execute the same test 100 times, I have a 500 MB size database, even I have only 2 records. I tried to