Skip to content

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented Oct 22, 2024

What problem does this PR solve?

Issue Number: close #54061

Problem Summary:

During the rolling upgrade, when the distributed execution framework is enabled, the add index task is processed, and data indexes may be inconsistent.

The limitation is only a defensive measure based on previous issues, we don't have unsolved data inconsistent issues.

Since the issue is fixed(#50895), and the limitation introduces inconvenience to many users, we should remove the check in the following versions.

What changed and how does it work?

Remove distributed task configuration check before upgrade.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    Before this PR:
    1. Deploy a nightly cluster without TiDB instance.
    2. Start TiDB v7.5.
    3. Set @@global.tidb_enable_dist_task to ON.
    4. Kill TiDB v7.5.
    5. Start TiDB master.
      TiDB cannot startup and report error:
    [FATAL] [bootstrap.go:1495] ["cannot upgrade when tidb_enable_dist_task is enabled, please set tidb_enable_dist_task to off before upgrade"] [] [stack="github.com/pingcap/tidb/pkg/session.checkDistTask\n\t/home/tangenta/tidb/pkgsession/bootstrap.go:1495\ngithub.com/pingcap/tidb/pkg/session.upgrade\n\t/home/tangenta/tidb/pkg/session/bootstrap.go:1538\ngithub.com/pingcap/tidb/pkg/session.runInBootstrapSession\n\t/home/tangenta/tidb/pkg/session/sessiongo:3738\ngithub.com/pingcap/tidb/pkg/session.bootstrapSessionImpl\n\t/home/tangenta/tidb/pkg/session/session.go:3460\ngithub.com/pingcap/tidb/pkg/session.BootstrapSession\n\t/home/tangenta/tidb/pkg/session/session.go:3406\nmaincreateStoreDDLOwnerMgrAndDomain\n\t/home/tangenta/tidb/cmd/tidb-server/main.go:418\nmain.main\n\t/home/tangenta/tidb/cmd/tidb-server/main.go:321\nruntime.main\n\t/home/tangenta/go/pkg/mod/golang.org/[email protected]/src/runtime/proc.go:272"]
    
    After this PR, we removed the check checkDistTask, TiDB can startup and upgrade normally:
    mysql> select tidb_version();
    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | tidb_version()                                                                                                                                                                                                  |
    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Release Version: v8.4.0-this-is-a-placeholder
    Edition: Community
    Git Commit Hash: None
    Git Branch: None
    UTC Build Time: None
    GoVersion: go1.23.2
    Race Enabled: false
    Check Table Before Drop: false
    Store: tikv |
    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)
    
    mysql> select @@global.tidb_enable_dist_task;
    +--------------------------------+
    | @@global.tidb_enable_dist_task |
    +--------------------------------+
    |                              1 |
    +--------------------------------+
    1 row in set (0.00 sec)
    
  • 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 Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 22, 2024
@tangenta tangenta requested a review from D3Hunter October 22, 2024 08:14
Copy link

tiprow bot commented Oct 22, 2024

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

@tangenta tangenta requested a review from wjhuang2016 October 22, 2024 08:14
@tangenta tangenta changed the title session: remove upgrade limitation from distributed tasks session: remove distributed tasks limitation from upgrade Oct 22, 2024
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.5476%. Comparing base (d0d4876) to head (0fb6cb3).
Report is 795 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56773        +/-   ##
================================================
+ Coverage   73.0457%   73.5476%   +0.5019%     
================================================
  Files          1689       1689                
  Lines        467009     467739       +730     
================================================
+ Hits         341130     344011      +2881     
+ Misses       104894     102800      -2094     
+ Partials      20985      20928        -57     
Flag Coverage Δ
integration 42.8521% <ø> (?)
unit 72.5880% <ø> (+0.0551%) ⬆️

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

Components Coverage Δ
dumpling ∅ <ø> (∅)
parser ∅ <ø> (∅)
br 46.8007% <ø> (-0.0476%) ⬇️
🚀 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 the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 23, 2024
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 8, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 9, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 13, 2024
Copy link

ti-chi-bot bot commented Nov 13, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-23 02:54:14.362076563 +0000 UTC m=+406055.058867167: ☑️ agreed by D3Hunter.
  • 2024-11-13 08:50:12.555777351 +0000 UTC m=+432574.746646348: ☑️ agreed by wjhuang2016.

Copy link

ti-chi-bot bot commented Feb 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benmeadowcroft, D3Hunter, wjhuang2016

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 Feb 5, 2025
@ti-chi-bot ti-chi-bot bot merged commit fc8bdb5 into pingcap:master Feb 5, 2025
22 checks passed
@tangenta tangenta added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. labels Feb 7, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #59285.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 7, 2025
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 7, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #59286.
But this PR has conflicts, please resolve them!

zeminzhou pushed a commit to zeminzhou/tidb that referenced this pull request May 6, 2025
@tangenta tangenta added needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Jun 24, 2025
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 24, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #61954.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 24, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #61955.
But this PR has conflicts, please resolve them!

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-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cluster update failed with check dist task failed, tidb_enable_dist_task is enabled
5 participants