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

some system variable default value are different after upgrade #34847

Closed
seiya-annie opened this issue May 20, 2022 · 7 comments · Fixed by #34862
Closed

some system variable default value are different after upgrade #34847

seiya-annie opened this issue May 20, 2022 · 7 comments · Fixed by #34862
Assignees
Labels
affects-6.1 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. install a v6.0.0 tidb cluster without doing any configuration
  2. upgrade to nightly(v6.1.0)
  3. check default value of system variable

2. What did you expect to see? (Required)

tidb_committer_concurrency = 128
tidb_enable_auto_analyze=ON
tidb_mem_oom_action = Cancel
tidb_mem_quota_query = 1073741824

3. What did you see instead (Required)

[tidb@101 610]$ diff 610-systemvar_new_install.txt 610-systemvar-upgrade.txt 
492c492
< tidb_committer_concurrency	128
---
> tidb_committer_concurrency	1
503c503
< tidb_enable_auto_analyze	ON
---
> tidb_enable_auto_analyze	OFF
523c523
< tidb_enable_prepared_plan_cache	ON
---
> tidb_enable_prepared_plan_cache	OFF
564c564
< tidb_mem_oom_action	CANCEL
---
> tidb_mem_oom_action	
568c568
< tidb_mem_quota_query	1073741824
---
> tidb_mem_quota_query	0
598c598
< tidb_prepared_plan_cache_size	100
---
> tidb_prepared_plan_cache_size	1000

4. What is your TiDB version? (Required)

Git Commit Hash: 6a02393
Git Branch: heads/refs/tags/v6.1.0-alpha
UTC Build Time: 2022-05-19 15:26:56

@seiya-annie seiya-annie added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra labels May 20, 2022
@seiya-annie
Copy link
Author

seiya-annie commented May 20, 2022

tidb config file before upgrade: 600-tidb.txt

@zimulala
Copy link
Contributor

tidb_enable_prepared_plan_cache and tidb_prepared_plan_cache_size changes the default
value because of #34846.

@zimulala zimulala self-assigned this May 20, 2022
@zimulala
Copy link
Contributor

zimulala commented May 20, 2022

The other 4 variables(tidb_committer_concurrency, tidb_enable_auto_analyze, tidb_mem_oom_action, tidb_mem_quota_query) are modified after the PR: #34711

@seiya-annie
Copy link
Author

cluster topo.yaml 101default.yaml.gz

@zimulala
Copy link
Contributor

zimulala commented May 20, 2022

The committer-concurrency configuration item was removed(#34368) from the 6.1 configuration file, and the upgrade assigned the value of the committer-concurrency configuration item to tidb_committer_concurrency (ref #34711).
Then when this testing without specifying a configuration file (asked @seiya-annie), the committer-concurrency is zero. So the above phenomenon will occur.

@bb7133
Copy link
Member

bb7133 commented May 20, 2022

this testing without specifying a configuration file, the committer-concurrency is zero.

This is not expected and we need to fix it.

@bb7133 bb7133 assigned morgo and unassigned zimulala May 20, 2022
@morgo
Copy link
Contributor

morgo commented May 20, 2022

The bug can be reproduced by using no config file, and performing an upgrade from 6.0 to master. Here is what is written to the log file in bootstrap v90-91:

[2022/05/20 08:49:18.151 -06:00] [WARN] [bootstrap.go:1839] ["enable-batch-dml is now configured by the system variable tidb_enable_batch_dml. One-time importing the value specified in tidb.toml file"] [value=OFF]
[2022/05/20 08:49:18.152 -06:00] [WARN] [bootstrap.go:1839] ["mem-quota-query is now configured by the system variable tidb_mem_quota_query. One-time importing the value specified in tidb.toml file"] [value=0]
[2022/05/20 08:49:18.152 -06:00] [WARN] [bootstrap.go:1839] ["query-log-max-len is now configured by the system variable tidb_query_log_max_len. One-time importing the value specified in tidb.toml file"] [value="0 10"]
[2022/05/20 08:49:18.152 -06:00] [WARN] [bootstrap.go:1839] ["committer-concurrency is now configured by the system variable tidb_committer_concurrency. One-time importing the value specified in tidb.toml file"] [value=0]
[2022/05/20 08:49:18.152 -06:00] [WARN] [bootstrap.go:1839] ["run-auto-analyze is now configured by the system variable tidb_enable_auto_analyze. One-time importing the value specified in tidb.toml file"] [value=OFF]
[2022/05/20 08:49:18.153 -06:00] [WARN] [bootstrap.go:1839] ["oom-action is now configured by the system variable tidb_mem_oom_action. One-time importing the value specified in tidb.toml file"] [value=]
[2022/05/20 08:49:18.153 -06:00] [WARN] [bootstrap.go:1839] ["prepared-plan-cache.enable is now configured by the system variable tidb_enable_prepared_plan_cache. One-time importing the value specified in tidb.toml file"] [value=OFF]
[2022/05/20 08:49:18.153 -06:00] [WARN] [bootstrap.go:1839] ["prepared-plan-cache.capacity is now configured by the system variable tidb_prepared_plan_cache_size. One-time importing the value specified in tidb.toml file"] [value=1000]
[2022/05/20 08:49:18.153 -06:00] [WARN] [bootstrap.go:1839] ["prepared-plan-cache.memory-guard-ratio is now configured by the system variable tidb_prepared_plan_cache_memory_guard_ratio. One-time importing the value specified in tidb.toml file"] [value=0.1]

So I will modify the bootstraps to better handle incorrect values when no config file is present.

@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 labels May 23, 2022
@jebter jebter removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. labels May 23, 2022
@jebter jebter removed may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 labels May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants