docs-cn icon indicating copy to clipboard operation
docs-cn copied to clipboard

system-variable: add a warning message for `tidb_partition_prune_mode` variable

Open Defined2014 opened this issue 1 year ago • 8 comments

What is changed, added or deleted? (Required)

Deprecated static prune mode, ref https://github.com/pingcap/tidb/issues/56490

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • [x] master (the latest development version)
  • [ ] v8.4 (TiDB 8.4 versions)
  • [ ] v8.3 (TiDB 8.3 versions)
  • [ ] v8.2 (TiDB 8.2 versions)
  • [ ] v8.1 (TiDB 8.1 versions)
  • [ ] v7.5 (TiDB 7.5 versions)
  • [ ] v7.1 (TiDB 7.1 versions)
  • [ ] v6.5 (TiDB 6.5 versions)
  • [ ] v6.1 (TiDB 6.1 versions)
  • [ ] v5.4 (TiDB 5.4 versions)
  • [ ] v5.3 (TiDB 5.3 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s): ref https://github.com/pingcap/tidb/pull/56543

Do your changes match any of the following descriptions?

  • [ ] Delete files
  • [ ] Change aliases
  • [ ] Need modification after applied to another branch
  • [ ] Might cause conflicts after applied to another branch

Defined2014 avatar Oct 16 '24 01:10 Defined2014

I think also https://docs.pingcap.com/tidb/stable/partitioned-table, https://docs.pingcap.com/tidb/stable/use-tiflash-mpp-mode and https://docs.pingcap.com/tidb/stable/tiflash-upgrade-guide also needs updating?

I'll do this when we remove static prune mode, maybe v9.2. In v8.5 I only mentioned that it will be deprecated in the future.

Defined2014 avatar Oct 16 '24 11:10 Defined2014

I think also https://docs.pingcap.com/tidb/stable/partitioned-table, https://docs.pingcap.com/tidb/stable/use-tiflash-mpp-mode and https://docs.pingcap.com/tidb/stable/tiflash-upgrade-guide also needs updating?

I'll do this when we remove static prune mode, maybe v9.2. In v8.5 I only mentioned that it will be deprecated in the future.

There is a minor issue, that the examples will not output the same:

mysql> SET tidb_partition_prune_mode=static;
Query OK, 0 rows affected (0.00 sec)

vs

tidb> set @@tidb_partition_prune_mode='static';
Query OK, 0 rows affected, 1 warning (0.00 sec)

I.e. it will start showing a warning.

mjonss avatar Oct 16 '24 12:10 mjonss

I think also https://docs.pingcap.com/tidb/stable/partitioned-table, https://docs.pingcap.com/tidb/stable/use-tiflash-mpp-mode and https://docs.pingcap.com/tidb/stable/tiflash-upgrade-guide also needs updating?

I'll do this when we remove static prune mode, maybe v9.2. In v8.5 I only mentioned that it will be deprecated in the future.

There is a minor issue, that the examples will not output the same:

mysql> SET tidb_partition_prune_mode=static;
Query OK, 0 rows affected (0.00 sec)

vs

tidb> set @@tidb_partition_prune_mode='static';
Query OK, 0 rows affected, 1 warning (0.00 sec)

I.e. it will start showing a warning.

I can't reproduce it.

mysql> set tidb_partition_prune_mode='static';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> set tidb_partition_prune_mode=static;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> set @@tidb_partition_prune_mode=static;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> set @@tidb_partition_prune_mode='static';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> select tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                           |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.4.0-alpha-419-g3df0f2e927
Edition: Community
Git Commit Hash: 3df0f2e927a4d1d5b9431ab4dc0f5a2a71f04786
Git Branch: master
UTC Build Time: 2024-10-16 12:19:20
GoVersion: go1.23.2
Race Enabled: false
Check Table Before Drop: false
Store: unistore |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Defined2014 avatar Oct 16 '24 12:10 Defined2014

I think also https://docs.pingcap.com/tidb/stable/partitioned-table, https://docs.pingcap.com/tidb/stable/use-tiflash-mpp-mode and https://docs.pingcap.com/tidb/stable/tiflash-upgrade-guide also needs updating?

I'll do this when we remove static prune mode, maybe v9.2. In v8.5 I only mentioned that it will be deprecated in the future.

There is a minor issue, that the examples will not output the same:

mysql> SET tidb_partition_prune_mode=static;
Query OK, 0 rows affected (0.00 sec)

vs

tidb> set @@tidb_partition_prune_mode='static';
Query OK, 0 rows affected, 1 warning (0.00 sec)

I.e. it will start showing a warning.

I can't reproduce it.

So now it will have the additional , 1 warning in the output, since it is deprecated :) And before this version/PR it will not have a warning, so that is the difference.

mjonss avatar Oct 16 '24 13:10 mjonss

I think also https://docs.pingcap.com/tidb/stable/partitioned-table, https://docs.pingcap.com/tidb/stable/use-tiflash-mpp-mode and https://docs.pingcap.com/tidb/stable/tiflash-upgrade-guide also needs updating?

I'll do this when we remove static prune mode, maybe v9.2. In v8.5 I only mentioned that it will be deprecated in the future.

There is a minor issue, that the examples will not output the same:

mysql> SET tidb_partition_prune_mode=static;
Query OK, 0 rows affected (0.00 sec)

vs

tidb> set @@tidb_partition_prune_mode='static';
Query OK, 0 rows affected, 1 warning (0.00 sec)

I.e. it will start showing a warning.

I can't reproduce it.

So now it will have the additional , 1 warning in the output, since it is deprecated :) And before this version/PR it will not have a warning, so that is the difference.

Yes. It will take two more LTS releases to let users know it's deprecated.

Defined2014 avatar Oct 16 '24 13:10 Defined2014

/hold

lilin90 avatar Oct 17 '24 02:10 lilin90

@mjonss: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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[bot] avatar Nov 18 '24 11:11 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2024-11-19 02:50:50.917855111 +0000 UTC m=+929413.108724107: :ballot_box_with_check: agreed by lilin90.
  • 2024-11-19 07:18:25.502273465 +0000 UTC m=+945467.693142457: :ballot_box_with_check: agreed by hfxsd.

ti-chi-bot[bot] avatar Nov 19 '24 07:11 ti-chi-bot[bot]

/approve

lilin90 avatar Nov 22 '24 06:11 lilin90

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lilin90

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[bot] avatar Nov 22 '24 06:11 ti-chi-bot[bot]