Why does sub compaction in level style requires output level to be empty?

81 views
Skip to first unread message

Doodle Linus

unread,
Jan 17, 2022, 11:34:47 PM1/17/22
to rocksdb
Hi everyone, I am a newbie of rocksdb. Please feel free to point my misunderstanding.

In my scenario, we import data with `disable_auto_compactions = true` into an empty rocksdb, so after data is fully imported, all data is in L0. Then we trigger a manual compaction, and only one thread is doing compactions. After a little diggng, I see subcompaction requires output level is empty. See here, rocksdb/compaction.cc at a2b9be42b6d5ac4d44bcc6a9451a825440000769 · facebook/rocksdb (github.com)

Actually, all keys in our application is grouped by a `partition id`, so I think sub compactions could greatly improve compaction performance?

Again, feel free to point my misunderstanding. Thx
Reply all
Reply to author
Forward
0 new messages