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 to dynamically update some config items read from PD #14750

Merged
merged 26 commits into from
Feb 17, 2020

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Feb 12, 2020

What problem does this PR solve?

Part II to implement this proposal: #13660.
Wait for #14303.
In this PR, we refine some code about configs and support to dynamically update some configs items read from PD.

What is changed and how it works?

  1. remove some logic about updating configs online which may result in some conflicts with this feature:
    1.1. remove the feature of hot-reloading configs according to HTTP;
    1.2. forbid to update some config items according to SQL like set @key=val
  2. refine the logic about initializing configs

Check List

Tests

  • Unit test

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 12, 2020

/run-unit-test

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Feb 12, 2020

/run-unit-test

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 14, 2020

/run-unit-test

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Feb 14, 2020

/run-unit-test

ch.version = version
logutil.Logger(context.Background()).Info("PDConfHandler update config successfully",
zap.String("fromVersion", ch.version.String()), zap.String("toVersion", version.String()),
zap.String("new_config", newConfContent))
Copy link
Contributor

Choose a reason for hiding this comment

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

s/ newConfContent/ newConf ?
or
We only need to log the changed conf items?

Copy link
Contributor Author

@qw4990 qw4990 Feb 17, 2020

Choose a reason for hiding this comment

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

Now we have no method to check which config items changed, so I log them all.
But I will implement it in the next few PRs.

@qw4990 qw4990 removed the require-LGT3 Indicates that the PR requires three LGTM. label Feb 17, 2020
@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

@XuHuaiyu @wshwsh12 Thanks for your reviewing again, all comments have been addressed, PTAL.

Copy link
Contributor

@wshwsh12 wshwsh12 left a comment

Choose a reason for hiding this comment

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

LGTM

@wshwsh12 wshwsh12 added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 17, 2020
XuHuaiyu
XuHuaiyu previously approved these changes Feb 17, 2020
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@XuHuaiyu XuHuaiyu added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 17, 2020
@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

/run-unit-test

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

/run-unit-test

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

/run-all-tests

1 similar comment
@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Feb 17, 2020

All CI problems have been solved, please help me to approve this PR @XuHuaiyu @wshwsh12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants