我的理解:
1、 rocksdb使用iterator去扫描memtable、 sst,根据key进行prefix_seek定位,iterator会使用next从定位的起始key开始往下进行范围扫描,在此期间会碰到mvcc数据 、tombstone数据等。
2、skipped_count相关解释可以看下下面: delete_skipped_count 是rocksdb 表示删除后的tombstone key,这些在tikv是GC了的。key_skipped_count 包含delete_skipped和mvcc等的数量
When deleting a key, RocksDB simply puts a marker, called tombstone to memtable. The original value of the key will not be removed until we compact the files containing the keys with the tombstone. The tombstone may even live longer even after the original value is removed. So if we have lots of consecutive keys deleted, a user may experience slowness when iterating across these tombstones. Counters internal_delete_skipped_count tells us how many tombstones we skipped. internal_key_skipped_count covers some other keys we skip.
3、关闭 compaction-filter 后GC回到传统的模式,扫描数据然后在标记删除,这个过程也走raft,可能GC效率比 compaction-filter模式要低。