PageStorage: Fix peak memory usage when running GC on PageDirectory (#6168)#6184
PageStorage: Fix peak memory usage when running GC on PageDirectory (#6168)#6184ti-chi-bot wants to merge 1 commit into
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
@ti-chi-bot: This cherry pick PR is for a release branch and has not yet been approved by release team. To merge this cherry pick, it must first be approved by the collaborators. AFTER it has been approved by collaborators, please ping the release team in a comment to request a cherry pick review. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is an automated cherry-pick of #6168
What problem does this PR solve?
Issue Number: close #6163
Problem Summary:
The snapshot file getting bigger and bigger, causing peak memory usage after TiFlash running for a long time.
Introduced by #5357
#5357 want to resolve a bug that cause by concurrency between deleting a page and Full GC. But that fixes will make the entries in PageDirectory snapshot file getting bigger and bigger. Cause it can not ensure whether there are more edit on the pages with a
FileSnapshotWhat is changed and how it works?
TBD
Check List
Tests
Run the
HeavySkewWriteReadtesting pageworkload (based on #6178), we can see that before this PR, the wal snapshot file getting bigger and bigger as it does not remove the deleted page from snapshot file. After this PR, the wal snapshot file only keep the available page.Before this PR
After this PR
Side effects
Documentation
Release note