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

api: support input with a prefix when using config #2354

Merged
merged 6 commits into from
Apr 21, 2020

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Apr 15, 2020

What problem does this PR solve?

Currently, the input of JSON only supports like {"schedule-region-limit":20} when using config API, but TiDB will send a JSON like {"schedule.schedule-region-limit":20} when using SQL to change the config. This PR can be reviewed after #2349 is merged.

What is changed and how it works?

This PR support using the key like "xxx.xxx-xxx-xxx" when sending a JSON as an input.

Release note

Fix the issue that config API can not accept a config item with a prefix

Check List

Tests

  • Unit test

@rleungx rleungx added the component/api HTTP API. label Apr 15, 2020
@rleungx rleungx added this to the v4.0.0-ga milestone Apr 15, 2020
@rleungx
Copy link
Member Author

rleungx commented Apr 15, 2020

/run-all-tests

@rleungx rleungx force-pushed the prefix-config branch 3 times, most recently from f30b234 to fddc382 Compare April 17, 2020 08:15
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM

@overvenus overvenus requested review from qw4990 and NingLin-P April 17, 2020 08:51
@rleungx rleungx requested review from HunDunDM and nolouch April 17, 2020 10:07
@rleungx
Copy link
Member Author

rleungx commented Apr 17, 2020

/run-all-tests

rleungx added 4 commits April 20, 2020 16:08
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Copy link
Member

@HunDunDM HunDunDM left a comment

Choose a reason for hiding this comment

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

rest LGTM

server/api/config.go Outdated Show resolved Hide resolved
server/api/config.go Show resolved Hide resolved
server/api/config.go Show resolved Hide resolved
server/api/config.go Show resolved Hide resolved
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx
Copy link
Member Author

rleungx commented Apr 21, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 21, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 21, 2020

@rleungx merge failed.

@rleungx
Copy link
Member Author

rleungx commented Apr 21, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Apr 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 21, 2020

@rleungx merge failed.

@rleungx
Copy link
Member Author

rleungx commented Apr 21, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Apr 21, 2020

/run-all-tests

@sre-bot sre-bot merged commit dbd0c7b into tikv:master Apr 21, 2020
@rleungx rleungx deleted the prefix-config branch July 20, 2023 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api HTTP API. status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants