Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat: support to modify configs without restart #682

Merged
merged 33 commits into from
Dec 22, 2020

Conversation

levy5307
Copy link
Contributor

@levy5307 levy5307 commented Dec 7, 2020

Support to modify configs without restart.

NOTE

  1. String modifications is not supported.

  2. A example for http interface to update config:

http://localhost:34801/updateConfig?max_concurrent_bulk_load_downloading_count=5
  1. Please add DSN_TAG_VARIABLE(name, FT_MUTABLE) if you want to make a config mutable.

  2. I will add validator for config update, in next pull request.

acelyc111
acelyc111 previously approved these changes Dec 8, 2020
@levy5307 levy5307 marked this pull request as draft December 8, 2020 11:04
@levy5307 levy5307 marked this pull request as ready for review December 10, 2020 04:02
@hycdong
Copy link
Contributor

hycdong commented Dec 11, 2020

I review this pull request roughly, I think this pr implement a http get interface to support user update some configurations dynamically, we don't need to restart server any more. I recommend that you add some comments in code or descriptions, including:

  • The example of how to update the flag, the sample request and response
  • The restriction of this pr, such as string config is not supported, the name of configuration should be FLAGS_##name, old configuration is not supported etc.

By the way, would you consider adding another interface for listing names of the config who can be updated through http?

@levy5307
Copy link
Contributor Author

levy5307 commented Dec 14, 2020

I review this pull request roughly, I think this pr implement a http get interface to support user update some configurations dynamically, we don't need to restart server any more. I recommend that you add some comments in code or descriptions, including:

  • The example of how to update the flag, the sample request and response
  • The restriction of this pr, such as string config is not supported, the name of configuration should be FLAGS_##name, old configuration is not supported etc.

By the way, would you consider adding another interface for listing names of the config who can be updated through http?

Yes, I will add a http interface to list names of all of the configs in other pull requests.

acelyc111
acelyc111 previously approved these changes Dec 15, 2020
include/dsn/utility/flags.h Outdated Show resolved Hide resolved
include/dsn/utility/flags.h Outdated Show resolved Hide resolved
hycdong
hycdong previously approved these changes Dec 16, 2020
@hycdong hycdong added the component/http HTTP/RESTful support label Dec 16, 2020
src/utils/flags.cpp Outdated Show resolved Hide resolved
@levy5307 levy5307 closed this Dec 18, 2020
@levy5307 levy5307 reopened this Dec 18, 2020
@neverchanje neverchanje merged commit f6d218a into XiaoMi:master Dec 22, 2020
zhangyifan27 pushed a commit to zhangyifan27/rdsn that referenced this pull request Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component/http HTTP/RESTful support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants