toplingdb
toplingdb copied to clipboard
ToplingZipTable Builder: support distributed compressing
Compaction needs CompactionFilter, which may use DB::Get for metadata(such as pika/todis/kvrocks), in distributed compaction, compact_worker has no DB object, thus can not support such compaction.
ToplingZipTable Builder use two-pass scanning, it save decompressed kv data into tmp files, in second pass scaning, it read data from tmp file, thus we can run first pass scaning in DB side(local compation), and run second pass scanning in compaction worker to compress data -- compressing consumes 80+% CPU time for ToplingZipTable.