-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
store/gc_worker: Use UnsafeDestroyRange instead of DeleteRange in GC #7560
store/gc_worker: Use UnsafeDestroyRange instead of DeleteRange in GC #7560
Conversation
It's better to separate the modification of vendor to another pr. |
Oh, yes. It may be separated out from this PR later. |
Signed-off-by: MyonKeminta <[email protected]>
Signed-off-by: MyonKeminta <[email protected]>
Signed-off-by: MyonKeminta <[email protected]>
Signed-off-by: MyonKeminta <[email protected]>
Signed-off-by: MyonKeminta <[email protected]>
Signed-off-by: MyonKeminta <[email protected]>
Signed-off-by: MyonKeminta <[email protected]>
Signed-off-by: MyonKeminta <[email protected]>
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
Signed-off-by: MyonKeminta <[email protected]>
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
@tiancaiamao PTAL thanks! |
/run-integration-tests |
store/tikv/gcworker/gc_worker.go
Outdated
metrics.GCWorkerCounter.WithLabelValues("re_delete_range").Inc() | ||
|
||
// We check delete range records that are deleted about 24 hours ago. | ||
safePointTime := oracle.PhysicalToTime(oracle.ExtractPhysical(safePoint)) |
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.
I think calculation on the TS directly is simpler, may need to extract the constant.
reDeleteTs := safepoint + oracle.ComposePhysical(24 * 60 * 60 * 1000), 0)
Signed-off-by: MyonKeminta <[email protected]>
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
/run-all-tests |
LGTM |
/run-unit-test |
What problem does this PR solve?
This PR tries to solve the problem that the third step of GC, DeleteRanges, is too slow.
What is changed and how it works?
GetAllStores
function to PdClientdelete_range_done
table and pick ranges deleted 24 hours again, and call DestroyRange againThe idea is detailed recorded in tikv/rfcs#2
This PR should not be merged before tikv/tikv#3560
Check List
Tests
Code changes
Side effects