fix(compaction): skip collect rowids for unindexed fragment or stable row ids#6495
fix(compaction): skip collect rowids for unindexed fragment or stable row ids#6495zhangyue19921010 wants to merge 5 commits intolance-format:mainfrom
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| if has_indexed_fragments { | ||
| return Ok(true); | ||
| } |
There was a problem hiding this comment.
maybe I am missing some context, just curious why do we always need to capture the row_addr column in case the fragments have an index?
There was a problem hiding this comment.
Indexed fragments need row addr capture because compaction changes the physical addresses that existing indexes point to(unstable row IDs).To keep the index valid, compaction needs a mapping() from old addresses to new addresses. The captured _rowaddr column gives the old addresses of the rows that survived the rewrite.
There was a problem hiding this comment.
clear! thanks for the explanation @zhangyue19921010
|
Hi @Xuanwo, would you mind taking a look? I’d really appreciate your help. Thanks in advance! |
In compaction, collecting and transferring fragment rowids / row_addrs is expensive.
If the fragments in a compaction task do not belong to any index, then this data does not require immediate remapping
therefore does not require collecting the old rowids