storage: support online config for flow-control module#17396
storage: support online config for flow-control module#17396ti-chi-bot[bot] merged 10 commits intotikv:masterfrom
Conversation
Signed-off-by: glorv <glorvs@163.com>
[LGTM Timeline notifier]Timeline:
|
|
/merge |
|
@Connor1996: We have migrated to builtin 👉 Please use
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 ti-community-infra/tichi repository. |
|
/approve |
|
@zhangjinpeng87 PTAL |
|
/retest |
| ); | ||
| let discard_ratio = Arc::new(AtomicU32::new(0)); | ||
| let checker = FlowChecker::new(config, engine, discard_ratio.clone(), limiter.clone()); | ||
| let config_tracker = Arc::new(VersionTrack::new(config.clone())); |
There was a problem hiding this comment.
Just trying to learn, what's the benefit of using a VersionTracker instead of a RwLock? Do we use the version anywhere?
There was a problem hiding this comment.
There is no much difference here as we don't have any Tracker of this config.
src/storage/config_manager.rs
Outdated
| } | ||
| self.flow_controller.enable(enable); | ||
| } | ||
| self.flow_controller.update_config(flow_control)?; |
There was a problem hiding this comment.
Should we call flow_controller.update_config(flow_control) before L79 (flow_controller.enable(enable)) ? As it is, I feel like there could be a small race condition and metric issue in the following scenario:
When we disable the flow controller, checker.reset_statistics() will be called first, but current_cfg.enable may still be true when on_flow_info_msg is called. So metrics like SCHED_PENDING_COMPACTION_BYTES_GAUGE may be non-zero after we disable the flow controller, which might be unexpected. Not sure if I understand all this correctly though.
|
@glorv: Your PR was out of date, I have automatically updated it for you. If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Connor1996, glorv, LykxSassinator, zhangjinpeng87 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
close tikv#17395 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
close tikv#17395 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
tikv#17396). Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
Rollup of following sst ingestion optimizations * raftstore: directly write kvs rather than ingestion when merging small regions. (#17408) (#18518) * raftstore: remove stale ranges by DeleteByKeys rather than ingesting. (#18040) (#18519) * raftstore: support rocksdb writes during ingestion #18096 (#18520) * storage: support online config for flow-control module (#17396). (#18523) * sst_importer: allow write during ingesting sst (#18514) (#18522) Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> Signed-off-by: Neil Shen <overvenus@gmail.com> Co-authored-by: lucasliang <nkcs_lykx@hotmail.com>
…ule (tikv#17396) Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
close #17395 support online config for flow-control module Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> Co-authored-by: glorv <glorvs@163.com> Co-authored-by: lucasliang <nkcs_lykx@hotmail.com>
What is changed and how it works?
Issue Number: Close #17395
What's Changed:
Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note