-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: Refactor config #255
feat: Refactor config #255
Conversation
另外就是好奇一下PikiwiDB有在非初始化阶段更改配置的需求嘛? |
Also, I am curious about whether PikiwiDB needs to change the configuration during the non-initialization stage? |
运行时修改吗?有的 |
Is it modified during runtime? Yes |
edc3be3
to
040e10b
Compare
3408e76
to
8b69e5c
Compare
8b69e5c
to
4d20cca
Compare
4d20cca
to
21b7cd3
Compare
c96e14c
to
7724da4
Compare
7724da4
to
35b4cc6
Compare
874ffab
874ffab
to
aa7ed59
Compare
aa7ed59
to
9dc71e1
Compare
支持三种类型的配置信息 : string (包括 multi string) 、Number(int, double等等类型)和 Bool 类型.
除了 string 外的类型使用 atomic 原子读写. 对于 string 类型封装了 AtomicString.
需要通过 config get 去读取或者 config set 去设置的成员会添加到 map 中. config set/get 会对 map 进行通用操作,所以新增 config 或者删除 config 不需要更改 config set/get 的实现, 只需要在 Config 类中添加成员, 并将其加入到 map 中即可.
暂时使用了 RocksDB 的 Status 作为返回值, 但是返回的message有点冗余, 如果自己能够实现一个类似于 RocksDB::Status 的话, 会方便很多
在配置文件中添加了 RocksDB 参数并修改了传入 RocksDB Options 的逻辑.