*: move config file option tidb_txn_total_size_limit and tidb_txn_entry_size_limit to sysvar#34448
*: move config file option tidb_txn_total_size_limit and tidb_txn_entry_size_limit to sysvar#34448Alkaagr81 wants to merge 23 commits intopingcap:masterfrom
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
/run-unit-test |
|
/run-all-tests |
|
Nevermind, upgrade task has been added |
kv/kv.go
Outdated
| var ( | ||
| // TxnEntrySizeLimit is limit of single entry size (len(key) + len(value)). | ||
| TxnEntrySizeLimit uint64 = config.DefTxnEntrySizeLimit | ||
| TxnEntrySizeLimit = atomic.NewUint64(10485760) //DefTiDBTxnEntrySizeLimit |
There was a problem hiding this comment.
Why not using DefTiDBTxnEntrySizeLimit directly? BTW 10485760 is not equal to DefTiDBTxnEntrySizeLimit((6 * 1024 * 1024))
There was a problem hiding this comment.
Afaik this is due to circular dependencies since sessionctx/variable imports kv. But I agree we can change the starting value to 6M. It will be overwritten in the startup procedure though, as the sysvar cache is populated.
| TxnEntrySizeLimit = atomic.NewUint64(10485760) //DefTiDBTxnEntrySizeLimit | ||
| // TxnTotalSizeLimit is limit of the sum of all entry size. | ||
| TxnTotalSizeLimit uint64 = config.DefTxnTotalSizeLimit | ||
| TxnTotalSizeLimit = atomic.NewUint64(100 * 1024 * 1024) //DefTiDBTxnTotalSizeLimit |
|
|
||
| // CMSketchSizeLimit indicates the size limit of CMSketch. | ||
| var CMSketchSizeLimit = kv.TxnEntrySizeLimit / binary.MaxVarintLen32 | ||
| var CMSketchSizeLimit = kv.TxnEntrySizeLimit.Load() / binary.MaxVarintLen32 |
|
/hold We need to verify the change related to |
|
@Alkaagr81: PR needs rebase. DetailsInstructions 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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #34448 +/- ##
================================================
- Coverage 62.8182% 62.8116% -0.0067%
================================================
Files 850 850
Lines 276679 276686 +7
================================================
- Hits 173805 173791 -14
- Misses 89080 89098 +18
- Partials 13794 13797 +3 🚀 New features to boost your workflow:
|
|
@Alkaagr81: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
What problem does this PR solve?
Issue Number: ref #33769
Problem Summary:
The option
tidb_txn_total_size_limitandtidb_txn_entry_size_limithas historically been a config option. But based on requirements from cloud & PM it should instead be a sysvar scope Global.What is changed and how it works?
Remove them from the config list and add them to global sysvars.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.