Skip to content

*: move config file option enable-batch-dml to sysvar#33803

Merged
ti-chi-bot merged 20 commits intopingcap:masterfrom
morgo:tidb-enable-batch-dml
May 13, 2022
Merged

*: move config file option enable-batch-dml to sysvar#33803
ti-chi-bot merged 20 commits intopingcap:masterfrom
morgo:tidb-enable-batch-dml

Conversation

@morgo
Copy link
Contributor

@morgo morgo commented Apr 8, 2022

What problem does this PR solve?

Issue Number: ref #33769

Problem Summary:

The option enable-batch-dml has historically been a config option. But based on requirements from cloud & PM it should instead be a sysvar.

What is changed and how it works?

This does the minimum work to convert enable-batch-dml to a global (cluster-wide) sysvar, and removes the config option (placing it in the previously deprecated list).

Check List

Tests

  • Unit test (convert existing tests)
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility
    This might be a bit confusing during upgrade for users who have previously set enable-batch-dml (most users haven't). It needs to be documented in the release notes that it has been replaced with the system variable tidb_enable_batch_dml.

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.

The TiDB configuration file option `enable-batch-dml` has been replaced by the system variable `tidb_enable_batch_dml`. This change makes it easier to modify this setting on a cluster wide basis.

@morgo morgo requested a review from a team as a code owner April 8, 2022 02:28
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 8, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • xhebox

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 8, 2022
@morgo morgo force-pushed the tidb-enable-batch-dml branch from 79d315b to e67247d Compare April 12, 2022 18:58
@sre-bot
Copy link
Contributor

sre-bot commented Apr 12, 2022

@morgo morgo added the compatibility-breaker Violation of forwards/backwards compatibility in a design-time piece. label Apr 13, 2022
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 20, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2022
@morgo morgo requested a review from bb7133 April 27, 2022 02:33
@morgo
Copy link
Contributor Author

morgo commented Apr 28, 2022

/run-build

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 5, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 5, 2022
@bb7133
Copy link
Member

bb7133 commented May 6, 2022

This might be a bit confusing during upgrade for users who have previously set enable-batch-dml (most users haven't). It needs to be documented in the release notes that it has been replaced with the system variable tidb_enable_batch_dml.

It's really a big risk for the upgraded cluster: when the users upgraded TiDB from v6.0 to v6.1, the behavior of the cluster will be changed(enable-batch-dml became false) unless they read the release note.

Could we add a upgradeToVerXXX function in bootstrap step, set the sysvar using the configuration to make sure that upgraded clusteres keeps the original behavior?

@morgo
Copy link
Contributor Author

morgo commented May 6, 2022

Could we add a upgradeToVerXXX function in bootstrap step, set the sysvar using the configuration to make sure that upgraded clusteres keeps the original behavior?

I had considered that, but the reason why I did not, was that it would only be able to read the configuration value from one tidb server (the one that runs the bootstrap upgrade process) and not all TiDB servers. My concern with that specifically, is it is not quite deterministic (you might have more than one server, with more than one config, once the bootstrap is run, it's done.)

I am happy to change it to this if you consider it more correct however.

@bb7133
Copy link
Member

bb7133 commented May 6, 2022

it would only be able to read the configuration value from one tidb server (the one that runs the bootstrap upgrade process) and not all TiDB servers.

That would be fine IMHO, for most of the clusters, the configurations would be the same for all instances if TiUP/TiDB Operator is used. Even if there is any case in which configurations are different for instances, the in-deterministic would be acceptable.

I am happy to change it to this if you consider it more correct however.

Yes, please!

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 8, 2022
@morgo morgo force-pushed the tidb-enable-batch-dml branch from feb1607 to 5bc56db Compare May 10, 2022 15:22
@bb7133
Copy link
Member

bb7133 commented May 13, 2022

PTAL @hawkingrei @xhebox @tiancaiamao

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 13, 2022
@xhebox
Copy link
Contributor

xhebox commented May 13, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 1f4f86c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 13, 2022
@hawkingrei
Copy link
Member

/run-all-tests

@hawkingrei
Copy link
Member

@morgo Please fix it.

[2022-05-13T08:04:04.681Z] session/nontransactional.go:116:18: undefined: config

@hawkingrei
Copy link
Member

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 13, 2022
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label May 13, 2022
@morgo
Copy link
Contributor Author

morgo commented May 13, 2022

/unhold
/merge

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 13, 2022
@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 26c8332

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 13, 2022
@ti-chi-bot ti-chi-bot merged commit bbfbe13 into pingcap:master May 13, 2022
@sre-bot
Copy link
Contributor

sre-bot commented May 13, 2022

TiDB MergeCI notify

🔴 Bad News! New failing [1] after this pr merged.
These new failed integration tests seem to be caused by the current PR, please try to fix these new failed integration tests, thanks!

CI Name Result Duration Compare with Parent commit
idc-jenkins-ci-tidb/integration-ddl-test 🟥 failed 1, success 5, total 6 5 min 40 sec New failing
idc-jenkins-ci/integration-cdc-test 🟢 all 34 tests passed 26 min Existing passed
idc-jenkins-ci-tidb/integration-common-test 🟢 all 11 tests passed 10 min Existing passed
idc-jenkins-ci-tidb/tics-test 🟢 all 1 tests passed 5 min 56 sec Existing passed
idc-jenkins-ci-tidb/common-test 🟢 all 12 tests passed 5 min 27 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-2 🟢 all 28 tests passed 4 min 54 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-1 🟢 all 26 tests passed 4 min 26 sec Existing passed
idc-jenkins-ci-tidb/mybatis-test 🟢 all 1 tests passed 3 min 25 sec Existing passed
idc-jenkins-ci-tidb/integration-compatibility-test 🟢 all 1 tests passed 2 min 45 sec Existing passed
idc-jenkins-ci-tidb/plugin-test 🟢 build success, plugin test success 4min Existing passed

@cfzjywxk
Copy link
Contributor

cfzjywxk commented Aug 23, 2022

The batch DML is to be deprecated in the future, I think we don't need to make it public to the users again instead non-transactional DML is suggested to be used.
/cc @jackysp @ekexium @zhangjinpeng1987 @TomShawn

@ekexium
Copy link
Member

ekexium commented Aug 23, 2022

The batch DML is to be deprecated in the future, I think we don't need to make it public to the users again instead non-transactional DML is suggested to be used. /cc @jackysp @ekexium @zhangjinpeng1987 @TomShawn

There are users using this feature and they keep asking how to enable it in the past months. I'm not sure if it's the right time to hide it

@morgo morgo deleted the tidb-enable-batch-dml branch August 23, 2022 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility-breaker Violation of forwards/backwards compatibility in a design-time piece. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants