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

config: support online change rocksdb config #6377

Merged
merged 10 commits into from Jan 10, 2020

Conversation

@NingLin-P
Copy link
Contributor

NingLin-P commented Dec 31, 2019

This pr is part of online config change.
This pr add support for online change rocksdb config through config manager, under the hood, it is same as Debugger::modify_tikv_config except it only support change config on the Config struct.

What is the type of the changes?

  • New feature (a change which adds functionality)

How is the PR tested?

  • Integration test

Does this PR affect documentation (docs) or should it be mentioned in the release notes?

No

Does this PR affect tidb-ansible?

No

NingLin-P added 2 commits Dec 30, 2019
Signed-off-by: linning <linningde25@gmail.com>
add test
Signed-off-by: linning <linningde25@gmail.com>
NingLin-P added 4 commits Dec 31, 2019
Signed-off-by: linning <linningde25@gmail.com>
add log
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
@NingLin-P NingLin-P force-pushed the NingLin-P:dy-rocksdb-config branch from ec06ac0 to e64af2e Jan 3, 2020
@overvenus overvenus added this to the v4.0.0-beta milestone Jan 6, 2020
pub raftcf: RaftCfConfig,
#[config(skip)]

This comment has been minimized.

Copy link
@Connor1996

Connor1996 Jan 7, 2020

Member

why not include Titan

This comment has been minimized.

Copy link
@NingLin-P

NingLin-P Jan 7, 2020

Author Contributor

Do we now support change Titan config dynamically?

This comment has been minimized.

Copy link
@Connor1996

Connor1996 Jan 9, 2020

Member

blob_run_mode can be changed dynamically

fn dispatch(&mut self, change: ConfigChange) -> Result<(), Box<dyn Error>> {
let change_str = format!("{:?}", change);
let mut change: Vec<(String, ConfigValue)> = change.into_iter().collect();
let cf_config = change.drain_filter(|(name, _)| name.ends_with("cf"));

This comment has been minimized.

Copy link
@Connor1996

Connor1996 Jan 7, 2020

Member

what would the change string be like?

This comment has been minimized.

Copy link
@NingLin-P

NingLin-P Jan 7, 2020

Author Contributor

It will be the field name in the config struct like defaultcf.

This comment has been minimized.

Copy link
@NingLin-P

NingLin-P Jan 8, 2020

Author Contributor

The change_str will be something like {"rocksdb": {"defaultcf": {"target_file_size_base": 67108864b, "block_cache_size": 8388608b}, "max_background_jobs": 2}}.

src/config.rs Outdated Show resolved Hide resolved
NingLin-P added 3 commits Jan 8, 2020
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Copy link
Member

Connor1996 left a comment

LGTM

Copy link
Contributor

overvenus left a comment

LGTM

@sre-bot

This comment has been minimized.

Copy link
Collaborator

sre-bot commented Jan 10, 2020

/run-all-tests

@sre-bot sre-bot merged commit a5d14c3 into tikv:master Jan 10, 2020
6 checks passed
6 checks passed
DCO All commits are signed off!
Details
idc-jenkins-ci-tikv/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-copr-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.