Skip to content
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

kv: fix transaction too large error message #17198

Merged
merged 5 commits into from
May 14, 2020

Conversation

bobotu
Copy link
Contributor

@bobotu bobotu commented May 14, 2020

What problem does this PR solve?

The size hint in TxnTooLarge's message is the size limit of the staging buffer.

[kv:8004]Transaction is too large, size: 143

It is hard to understand.

What is changed and how it works?

Use the TxnTotalSizeLimit to generate error message.

Release note

  • Make the error message of Transaction is too large easier to understand.

@bobotu bobotu added type/enhancement The issue or PR belongs to an enhancement. needs-cherry-pick-4.0 labels May 14, 2020
@bobotu
Copy link
Contributor Author

bobotu commented May 14, 2020

/run-all-tests

@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #17198 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #17198   +/-   ##
===========================================
  Coverage   79.9887%   79.9887%           
===========================================
  Files           511        511           
  Lines        139202     139202           
===========================================
  Hits         111346     111346           
  Misses        18889      18889           
  Partials       8967       8967           

@jackysp jackysp added the sig/transaction SIG:Transaction label May 14, 2020
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use the transaction limit instead of sandbox.Size() when returning the error?

@bobotu bobotu changed the title kv: fix memDbBuffer size limit check and error message kv: fix transaction too large error message May 14, 2020
@bobotu
Copy link
Contributor Author

bobotu commented May 14, 2020

Why not just use the transaction limit instead of sandbox.Size() when returning the error?

Pushed a new commit, just change the error message. PTAL @jackysp

@bobotu bobotu requested a review from jackysp May 14, 2020 08:00
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@coocood coocood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coocood
Copy link
Member

coocood commented May 14, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 14, 2020
@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

@bobotu merge failed.

@bobotu
Copy link
Contributor Author

bobotu commented May 14, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

@bobotu merge failed.

@bobotu
Copy link
Contributor Author

bobotu commented May 14, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

@bobotu merge failed.

@bobotu
Copy link
Contributor Author

bobotu commented May 14, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

Your auto merge job has been accepted, waiting for:

  • 16798

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

@bobotu merge failed.

@bobotu
Copy link
Contributor Author

bobotu commented May 14, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

@bobotu merge failed.

@lysu
Copy link
Contributor

lysu commented May 14, 2020

/rebuild

@lysu
Copy link
Contributor

lysu commented May 14, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

@bobotu merge failed.

@bobotu
Copy link
Contributor Author

bobotu commented May 14, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot sre-bot merged commit eb5927a into pingcap:master May 14, 2020
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request May 14, 2020
@sre-bot
Copy link
Contributor

sre-bot commented May 14, 2020

cherry pick to release-4.0 in PR #17219

@bobotu bobotu deleted the fix-memdb-error branch May 14, 2020 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/transaction SIG:Transaction status/can-merge Indicates a PR has been approved by a committer. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants