Skip to content

Conversation

@seagel
Copy link
Contributor

@seagel seagel commented Dec 25, 2025

What problem does this PR solve?

Issue Number: close #56838

Problem Summary:

What changed and how does it work?

Added a 5-second context timeout to FTWRL execution. Triggers automatic fallback to LOCK TABLES if the timeout is reached.
Added unit test to verify the fallback logic during slow operation.

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

…tream operations for a certain time threshold

Signed-off-by: seagel <mehta.somesh636@gmail.com>
@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. contribution This PR is from a community contributor. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. component/dumpling This is related to Dumpling of TiDB. labels Dec 25, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 25, 2025

Hi @seagel. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 25, 2025

Welcome @seagel!

It looks like this is your first PR to pingcap/tidb 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to pingcap/tidb. 😃

@ti-chi-bot ti-chi-bot bot added the first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. label Dec 25, 2025
@tiprow
Copy link

tiprow bot commented Dec 25, 2025

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

Details

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.

@lance6716
Copy link
Contributor

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked labels Dec 26, 2025
}

func TestResolveAutoConsistencyFallback(t *testing.T) {
db, mock, err := sqlmock.New()
Copy link
Contributor

Choose a reason for hiding this comment

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

CI found db is not closed after test finished

@codecov
Copy link

codecov bot commented Dec 26, 2025

Codecov Report

❌ Patch coverage is 41.04683% with 214 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.7576%. Comparing base (2774ccb) to head (b43e37d).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #65273        +/-   ##
================================================
+ Coverage   70.7352%   70.7576%   +0.0224%     
================================================
  Files          1901       1901                
  Lines        518630     518864       +234     
================================================
+ Hits         366854     367136       +282     
+ Misses       127226     127175        -51     
- Partials      24550      24553         +3     
Flag Coverage Δ
integration 47.7827% <41.0468%> (-0.3976%) ⬇️

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

Components Coverage Δ
dumpling 52.8611% <ø> (-0.0089%) ⬇️
parser ∅ <ø> (∅)
br 57.9319% <0.0000%> (-0.3003%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ti-chi-bot ti-chi-bot bot added sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 27, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign benjamin2037, fixdb, xuhuaiyu for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details 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

@tiprow
Copy link

tiprow bot commented Dec 27, 2025

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

Test name Commit Details Required Rerun command
fast_test_tiprow b43e37d link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

Details

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

@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 27, 2025

@seagel: 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-error-log-review b43e37d link false /test pull-error-log-review
pull-unit-test-next-gen b43e37d link true /test pull-unit-test-next-gen
pull-unit-test-ddlv1 b43e37d link true /test pull-unit-test-ddlv1
idc-jenkins-ci-tidb/unit-test b43e37d link true /test unit-test

Full PR test history. Your PR dashboard.

Details

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/dumpling This is related to Dumpling of TiDB. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dumpling will stuck while it's expect to fallback to LOCK TABLES when FTWRL blocking for a long time