Skip to content

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented Feb 22, 2025

What problem does this PR solve?

Issue Number: close #59651

Problem Summary:
The Unistore cannot handle a row is larger than the lockstore arena blocksize.

What changed and how does it work?

Added an error when trying to lock a row that is too big.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Return error if a row is larger than the unistore lock blocksize instead of panic: runtime error: index out of range [-1]

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/needs-triage-completed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 22, 2025
Copy link

tiprow bot commented Feb 22, 2025

Hi @mjonss. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions 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-sigs/prow repository.

Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.3022%. Comparing base (811be5a) to head (8a4f9c8).
Report is 20 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59699        +/-   ##
================================================
+ Coverage   72.9648%   73.3022%   +0.3373%     
================================================
  Files          1695       1698         +3     
  Lines        468793     472399      +3606     
================================================
+ Hits         342054     346279      +4225     
+ Misses       105675     105026       -649     
- Partials      21064      21094        +30     
Flag Coverage Δ
integration 42.7876% <50.0000%> (?)
unit 72.1795% <100.0000%> (+0.0102%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.0125% <ø> (-0.0736%) ⬇️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 24, 2025
Copy link
Contributor

@dveeden dveeden left a comment

Choose a reason for hiding this comment

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

Another way of doing this would be to reduce the tidb_txn_entry_size_limit on startup if unistore is used. However I think doing this on write as it is done now is easier for people to understand.

Maybe adding a warning on startup would be nice, but I don't think that's needed either.

I think it is clear enough to the user that this is a unistore limitation, but we could explicitly add that to the message as well, just in case it wasn't clear enough.

@dveeden
Copy link
Contributor

dveeden commented Feb 24, 2025

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 24, 2025
Copy link
Contributor

@dveeden dveeden left a comment

Choose a reason for hiding this comment

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

Approved, but please add the comment as suggested by @Defined2014

Copy link

ti-chi-bot bot commented Feb 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, dveeden

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:
  • OWNERS [Defined2014,dveeden]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 24, 2025
Copy link

ti-chi-bot bot commented Feb 24, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-24 08:16:12.502734704 +0000 UTC m=+257320.455892970: ☑️ agreed by Defined2014.
  • 2025-02-24 08:51:58.380024443 +0000 UTC m=+259466.333182708: ☑️ agreed by dveeden.

@dveeden
Copy link
Contributor

dveeden commented Feb 24, 2025

/check-issue-triage-complete

@Defined2014
Copy link
Contributor

/retest

Copy link

tiprow bot commented Feb 25, 2025

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions 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-sigs/prow repository.

@Defined2014
Copy link
Contributor

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 25, 2025
@ti-chi-bot ti-chi-bot bot merged commit 9b325e4 into pingcap:master Feb 25, 2025
22 checks passed
@mjonss mjonss deleted the unistore-max-row-size-59651 branch February 25, 2025 08:34
zeminzhou pushed a commit to zeminzhou/tidb that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unistore crash on data import
3 participants