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

point-get: calculate the row level checksum on the real time to avoid incorrect checksum caused by schema change #52511

Merged
merged 17 commits into from
May 11, 2024

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Apr 11, 2024

What problem does this PR solve?

Issue Number: close #52590

Problem Summary:

What changed and how does it work?

  • tidb_row_checksum calculate the column-level checksum in the real time, instead of return the checksum store in the TiKV when the row inserted

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.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 11, 2024
@3AceShowHand 3AceShowHand marked this pull request as draft April 11, 2024 10:40
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 11, 2024
Copy link

tiprow bot commented Apr 11, 2024

Hi @3AceShowHand. 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/test-infra repository.

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 12, 2024
@3AceShowHand 3AceShowHand marked this pull request as ready for review April 12, 2024 10:36
@ti-chi-bot ti-chi-bot bot removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked labels Apr 12, 2024
Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 67.27273% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 74.6444%. Comparing base (c60f97d) to head (eedc297).
Report is 54 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52511         +/-   ##
=================================================
+ Coverage   57.7692%   74.6444%   +16.8752%     
=================================================
  Files          1409       1511        +102     
  Lines        396668     449799      +53131     
=================================================
+ Hits         229152     335750     +106598     
+ Misses       150078      93812      -56266     
- Partials      17438      20237       +2799     
Flag Coverage Δ
integration 49.2388% <26.3636%> (?)
unit 71.9719% <67.2727%> (+15.4364%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (∅)
parser ∅ <ø> (∅)
br 44.1379% <ø> (+43.4922%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. sig/planner SIG: Planner and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 16, 2024
@3AceShowHand 3AceShowHand force-pushed the row-checksum-realtime branch from 1b858cc to e3ad463 Compare April 16, 2024 09:49
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 16, 2024
@3AceShowHand 3AceShowHand requested review from zyguan and removed request for zyguan April 30, 2024 03:12
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 7, 2024
@3AceShowHand 3AceShowHand force-pushed the row-checksum-realtime branch from 707258f to 741a694 Compare May 7, 2024 09:23
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 7, 2024
@3AceShowHand 3AceShowHand requested a review from zyguan May 7, 2024 09:23
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 7, 2024
@3AceShowHand
Copy link
Contributor Author

/retest

Copy link

ti-chi-bot bot commented May 8, 2024

@3AceShowHand: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-lightning-integration-test 1b858cc link true /test pull-lightning-integration-test
pull-br-integration-test 1b858cc link true /test pull-br-integration-test

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label May 8, 2024
Comment on lines +456 to +459
if !rowcodec.IsNewFormat(val) {
checksumCols.AppendNull(0)
continue
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be explained in user documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got your point, I think we can update the documentation to let user's know tat checksum only calculated on the new format.

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 10, 2024
Copy link

ti-chi-bot bot commented May 10, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-08 15:34:46.375250636 +0000 UTC m=+1062640.132386209: ☑️ agreed by zyguan.
  • 2024-05-10 09:13:42.06271985 +0000 UTC m=+1212575.819855424: ☑️ agreed by tangenta.

Copy link

ti-chi-bot bot commented May 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tangenta, XuHuaiyu, zyguan

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label May 11, 2024
@ti-chi-bot ti-chi-bot bot merged commit 6d92e7a into pingcap:master May 11, 2024
23 checks passed
terry1purcell pushed a commit to terry1purcell/tidb that referenced this pull request May 17, 2024
RidRisR pushed a commit to RidRisR/tidb that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tidb_row_checksum() calculate the returned value on the real time instead of previous stored value
4 participants