-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage: Fix getSquashDeleteRange
does not return correctly squashed key-range when using common-handle
#9530
Conversation
2942d77
to
253b921
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JinheLin, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
…d key-range when using common-handle (#9530) (#9565) close #9529 Storage: Fix `getSquashDeleteRange` does not return correctly squashed key-range when using common-handle Co-authored-by: JaySon <[email protected]> Co-authored-by: JaySon-Huang <[email protected]>
…d key-range when using common-handle (#9530) (#9541) close #9529 Storage: Fix `getSquashDeleteRange` does not return correctly squashed key-range when using common-handle Co-authored-by: JaySon-Huang <[email protected]> Co-authored-by: JaySon <[email protected]>
…d key-range when using common-handle (#9530) (#9542) close #9529 Storage: Fix `getSquashDeleteRange` does not return correctly squashed key-range when using common-handle Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: JaySon-Huang <[email protected]> Co-authored-by: JaySon <[email protected]> Co-authored-by: JaySon-Huang <[email protected]> Co-authored-by: Lloyd-Pottiger <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
What problem does this PR solve?
Issue Number: close #9529
Problem Summary:
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 timelyWhat is changed and how it works?
ColumnFileSetSnapshot::{is_common_handle, rowkey_column_size}
shouldCompactDeltaWithStable
DMFilePackFilter
Check List
Tests
Side effects
Documentation
Release note