-
Notifications
You must be signed in to change notification settings - Fork 409
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
Storages: limit memory usage of data sharing (#8567) #8573
Storages: limit memory usage of data sharing (#8567) #8573
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
/run-all-tests |
/run-all-tests |
[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:
|
Changed to release note to be "Fix a bug that the memory usage rises significantly when there are slow queries" |
This is an automated cherry-pick of #8567
What problem does this PR solve?
Issue Number: close #8564
Problem Summary:
In terms of design, we hope that by scheduling tasks, the shared data will be immediately read and deleted, so under normal circumstances, it will not occupy additional memory.
However, there is a scenario that would break this assumption: If two requests A and B are merged, request A reads faster and request B reads slowly.
A will share the data with B, but request B may skip directly without reading and deleting these shared data, because it finds its queue is full (
tiflash/dbms/src/Storages/DeltaMerge/ReadThread/MergedTask.cpp
Lines 81 to 84 in 11c0567
What is changed and how it works?
This PR adds limitations on the size of shared data. It includes two aspects:
Check List
Tests
Side effects
Documentation
Release note