Skip to content

storage: support online config for flow-control module#17396

Merged
ti-chi-bot[bot] merged 10 commits intotikv:masterfrom
glorv:flow-ctl-config
Aug 23, 2024
Merged

storage: support online config for flow-control module#17396
ti-chi-bot[bot] merged 10 commits intotikv:masterfrom
glorv:flow-ctl-config

Conversation

@glorv
Copy link
Contributor

@glorv glorv commented Aug 19, 2024

What is changed and how it works?

Issue Number: Close #17395

What's Changed:

support online config for flow-control module

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • 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

Release note

Support online config change for flow-control related configs

Signed-off-by: glorv <glorvs@163.com>
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the dco. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 19, 2024
Copy link
Contributor

@LykxSassinator LykxSassinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 19, 2024
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 20, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-19 09:34:18.739783385 +0000 UTC m=+171653.874233502: ☑️ agreed by LykxSassinator.
  • 2024-08-20 09:20:53.733703226 +0000 UTC m=+257248.868153342: ☑️ agreed by Connor1996.

@Connor1996
Copy link
Member

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 20, 2024

@Connor1996: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: Proposal: Strengthen configuration change approval.

Details

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 ti-community-infra/tichi repository.

@glorv
Copy link
Contributor Author

glorv commented Aug 20, 2024

/approve

@glorv
Copy link
Contributor Author

glorv commented Aug 20, 2024

@zhangjinpeng87 PTAL

@glorv
Copy link
Contributor Author

glorv commented Aug 21, 2024

/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()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just trying to learn, what's the benefit of using a VersionTracker instead of a RwLock? Do we use the version anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no much difference here as we don't have any Tracker of this config.

}
self.flow_controller.enable(enable);
}
self.flow_controller.update_config(flow_control)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 23, 2024

@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.

Details

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 ti-community-infra/tichi repository.

glorv added 2 commits August 23, 2024 14:11
Signed-off-by: glorv <glorvs@163.com>
Signed-off-by: glorv <glorvs@163.com>
@zhangjinpeng87
Copy link
Member

/approve

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 23, 2024

[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

Details 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 ti-chi-bot bot added the approved label Aug 23, 2024
@ti-chi-bot ti-chi-bot bot merged commit 444270c into tikv:master Aug 23, 2024
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Aug 23, 2024
@glorv glorv deleted the flow-ctl-config branch September 24, 2024 08:20
@LykxSassinator LykxSassinator added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. labels Jun 5, 2025
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Jun 5, 2025
close tikv#17395

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Jun 5, 2025
close tikv#17395

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #18511.
But this PR has conflicts, please resolve them!

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #18512.
But this PR has conflicts, please resolve them!

LykxSassinator added a commit to LykxSassinator/tikv that referenced this pull request Jun 8, 2025
overvenus pushed a commit that referenced this pull request Jun 8, 2025
#17396). (#18523)

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jun 10, 2025
 

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>
LykxSassinator added a commit to LykxSassinator/tikv that referenced this pull request Jun 12, 2025
…ule (tikv#17396)

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jun 12, 2025
…ule (#17396) (#18539)

close #17395

support online config for flow-control module

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jul 8, 2025
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flow control config should support online config

6 participants