-
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
tikv: add size limit to batch get cache #21015
Conversation
/run-all-tests |
/run-check_dev_2 |
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
s.mu.cached[string(key)] = val | ||
} | ||
|
||
const cachedSizeLimit = 10 << 30 |
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.
We could change it to a const for
Line 965 in 9af236c
if c.Performance.TxnTotalSizeLimit > 10<<30 { |
LGTM |
/merge |
/run-all-tests |
@bobotu merge failed. |
/merge |
/run-all-tests |
@bobotu merge failed. |
/merge |
/run-all-tests |
@bobotu merge failed. |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
/run-all-tests |
@bobotu merge failed. |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #21129 |
What problem does this PR solve?
Issue Number: close #19560
The internal cache used by
BatchGet
need a size limit, it is OK to randomly discard some entry in it.What is changed and how it works?
Add a size limit which equals to default
TxnTotalSizeLimit
. We can delete some entry from it randomly when the limit is exceeded.Release note