-
Notifications
You must be signed in to change notification settings - Fork 410
Closed
Labels
affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.component/storageseverity/moderatetype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
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
| auto actual_delete_range = snap->delta->getSquashDeleteRange().shrink(segment_range); | |
| if (actual_delete_range.none()) | |
| return false; |
In ColumnFileSetSnapshot::getSquashDeleteRange, it use the member variable is_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 in ColumnFileSetSnapshot
| RowKeyRange ColumnFileSetSnapshot::getSquashDeleteRange() const | |
| { | |
| RowKeyRange squashed_delete_range = RowKeyRange::newNone(is_common_handle, rowkey_column_size); | |
| for (const auto & column_file : column_files) | |
| { | |
| if (auto * f_delete = column_file->tryToDeleteRange(); f_delete) | |
| squashed_delete_range = squashed_delete_range.merge(f_delete->getDeleteRange()); | |
| } | |
| return squashed_delete_range; | |
| } |
So when the table use common-handle, shouldCompactDeltaWithStable always returns false, and the segment background gc is not GC in timely
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
master
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.component/storageseverity/moderatetype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.