-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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/tikv: set memdb's size limits after create #24215
Conversation
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
|
@@ -397,9 +396,6 @@ func (c *twoPhaseCommitter) initKeysAndMutations() error { | |||
} | |||
c.txnSize = size | |||
|
|||
if size > int(tidbkv.TxnTotalSizeLimit) { | |||
return tidbkv.ErrTxnTooLarge.GenWithStackByArgs(size) | |||
} |
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.
It looks we don't need it because it is checked whenever memdb is updated.
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
@@ -139,6 +139,12 @@ func (us *KVUnionStore) GetOption(opt int) interface{} { | |||
return us.opts[opt] | |||
} | |||
|
|||
// SetEntrySizeLimit sets the size limit for each entry and total buffer. | |||
func (us *KVUnionStore) SetEntrySizeLimit(entryLimit, bufferLimit uint64) { |
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.
So we should attention that it is ok for tikv-client
to update the entrysizelimit in a transaction.
/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
[REVIEW NOTIFICATION] This pull request has been approved by:
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. Reviewer can indicate their review by writing |
Uh, |
I'll take a look. |
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 9f3d847
|
Signed-off-by: disksing i@disksing.com
What problem does this PR solve?
memdb depends on
kv.TxnEntrySizeLimit
andkv.TxnTotalSIzeLimit
to initialize.Part of #22513
What is changed and how it works?
What's Changed:
SetEntrySizeLimit
to update limits after createCheck List
Tests
Release note