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

txn: handle errors returned from Flush #52890

Merged
merged 6 commits into from Apr 28, 2024

Conversation

ekexium
Copy link
Contributor

@ekexium ekexium commented Apr 25, 2024

What problem does this PR solve?

Issue Number: close #52889

Problem Summary:

What changed and how does it work?

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 release-note-none size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 25, 2024
Copy link

tiprow bot commented Apr 25, 2024

Hi @ekexium. 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.

@ekexium ekexium force-pushed the handle-asseriton-error-for-flush branch from 4413164 to 156d97a Compare April 25, 2024 13:57
@ekexium ekexium requested review from you06 and cfzjywxk April 25, 2024 14:00
@@ -2274,6 +2270,14 @@ func runStmt(ctx context.Context, se *session, s sqlexec.Statement) (rs sqlexec.
}

rs, err = s.Exec(ctx)

// Pipelined-DML can return assertion error and write conflict here, handle them like we handle
Copy link
Contributor Author

@ekexium ekexium Apr 25, 2024

Choose a reason for hiding this comment

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

We have a new fork here(Commit and Flush). It may increase maintainability if we can avoid such duplicated code. But I have no good idea right now.

@ekexium ekexium changed the title fix: handle errors returned from Flush txn: handle errors returned from Flush Apr 25, 2024
@ekexium ekexium force-pushed the handle-asseriton-error-for-flush branch from 156d97a to ec382e1 Compare April 25, 2024 14:16
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.2824%. Comparing base (5598bde) to head (a8c616a).
Report is 2 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52890         +/-   ##
=================================================
- Coverage   72.3651%   55.2824%   -17.0828%     
=================================================
  Files          1482       1594        +112     
  Lines        428430     598065     +169635     
=================================================
+ Hits         310034     330625      +20591     
- Misses        99104     244366     +145262     
- Partials      19292      23074       +3782     
Flag Coverage Δ
integration 22.8396% <100.0000%> (?)
unit 71.2027% <60.0000%> (-0.0240%) ⬇️

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

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

…eturned from Commit

Signed-off-by: ekexium <eke@fastmail.com>
@ekexium ekexium force-pushed the handle-asseriton-error-for-flush branch from ec382e1 to fd4328a Compare April 25, 2024 14:25
pkg/session/session.go Outdated Show resolved Hide resolved
Signed-off-by: ekexium <eke@fastmail.com>
Signed-off-by: ekexium <eke@fastmail.com>
@ekexium
Copy link
Contributor Author

ekexium commented Apr 28, 2024

/retest

Copy link

tiprow bot commented Apr 28, 2024

@ekexium: 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/test-infra repository.

pkg/session/session.go Outdated Show resolved Hide resolved
Signed-off-by: ekexium <eke@fastmail.com>
Copy link

ti-chi-bot bot commented Apr 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, crazycs520

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 [cfzjywxk,crazycs520]

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

Copy link

ti-chi-bot bot commented Apr 28, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-28 04:30:04.346042357 +0000 UTC m=+158758.103177926: ☑️ agreed by crazycs520.
  • 2024-04-28 05:55:24.75214386 +0000 UTC m=+163878.509279433: ☑️ agreed by cfzjywxk.

@ekexium
Copy link
Contributor Author

ekexium commented Apr 28, 2024

/retest

Copy link

tiprow bot commented Apr 28, 2024

@ekexium: 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/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit 024fdd2 into pingcap:master Apr 28, 2024
21 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #52961.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.1 release-note-none size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors returned from Flush are not equally treated as those returned from Commit
4 participants