The gcTrySegmentMergeDelta
on common handle table can not GC data correctly in timely manner
#9529
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
component/storage
severity/moderate
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
we get the "suqash delete range" to estimate whether there are sufficient delete rows that we need to compact data in background thread.
tiflash/dbms/src/Storages/DeltaMerge/DeltaMergeStore_InternalBg.cpp
Lines 526 to 528 in ce0d411
In
ColumnFileSetSnapshot::getSquashDeleteRange
, it use the member variableis_common_handle
,rowkey_column_size
to generate the rowkey range.But actually those two variable are not set correctly.
is_common_handle
is always false inColumnFileSetSnapshot
tiflash/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileSetSnapshot.cpp
Lines 21 to 30 in ce0d411
So when the table use common-handle,
shouldCompactDeltaWithStable
always returns false, and the segment background gc is not GC in timely2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
master
The text was updated successfully, but these errors were encountered: