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

Make everything configurable #145

Merged
merged 7 commits into from
Jan 17, 2023

Conversation

Phoenix500526
Copy link
Collaborator

Please briefly answer these questions:
Enable XlineServer to boot from a given configuration file, including log config, cluster config, auth config, trace config

  • what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?)
    Enables Xline server to boot from a configuration file, avoiding hard-coding some parameters, like HEARTBEAT_INTERVAL([Curp] Make everything configurable #98 )

  • what changes does this pull request make?
    Add a config module in the util crate.
    Change the init logic of XlineServer, CurpServer and CurpClient

  • are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc)
    No

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #145 (a9a3160) into master (7d51adc) will increase coverage by 0.08%.
The diff coverage is 74.50%.

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   65.60%   65.68%   +0.08%     
==========================================
  Files          55       56       +1     
  Lines        8416     8979     +563     
==========================================
+ Hits         5521     5898     +377     
- Misses       2895     3081     +186     
Impacted Files Coverage Δ
benchmark/src/runner.rs 8.33% <0.00%> (-0.20%) ⬇️
curp/src/server/state.rs 100.00% <ø> (ø)
curp/src/server/tests.rs 81.17% <ø> (ø)
xline/src/main.rs 0.57% <0.00%> (-0.42%) ⬇️
curp/src/server/mod.rs 76.88% <84.00%> (-3.85%) ⬇️
utils/src/config.rs 87.22% <87.22%> (ø)
utils/src/lib.rs 91.52% <89.58%> (-8.48%) ⬇️
curp/src/server/bg_tasks.rs 91.64% <97.59%> (+0.52%) ⬆️
curp/src/client.rs 57.68% <100.00%> (-2.23%) ⬇️
curp/src/test_utils/curp_group.rs 44.44% <100.00%> (ø)
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Phoenix500526 Phoenix500526 force-pushed the make_everything_configurable branch 7 times, most recently from ae95311 to 28999fe Compare January 13, 2023 01:26
@Phoenix500526 Phoenix500526 marked this pull request as ready for review January 13, 2023 01:36
@Phoenix500526 Phoenix500526 requested review from themanforfree, rogercloud and markcty and removed request for themanforfree and rogercloud January 13, 2023 01:37
curp/src/server/mod.rs Outdated Show resolved Hide resolved
curp/src/server/bg_tasks.rs Outdated Show resolved Hide resolved
utils/src/config.rs Outdated Show resolved Hide resolved
utils/src/config.rs Show resolved Hide resolved
utils/src/config.rs Outdated Show resolved Hide resolved
utils/src/config.rs Outdated Show resolved Hide resolved
@Phoenix500526 Phoenix500526 force-pushed the make_everything_configurable branch 4 times, most recently from 0234f6b to f7b1904 Compare January 16, 2023 09:10
curp/src/server/bg_tasks.rs Outdated Show resolved Hide resolved
utils/Cargo.toml Outdated Show resolved Hide resolved
utils/src/config.rs Outdated Show resolved Hide resolved
xline/src/main.rs Outdated Show resolved Hide resolved
xline/src/main.rs Outdated Show resolved Hide resolved
xline/src/main.rs Outdated Show resolved Hide resolved
xline/src/main.rs Outdated Show resolved Hide resolved
xline/src/main.rs Outdated Show resolved Hide resolved
utils/src/lib.rs Outdated Show resolved Hide resolved
utils/src/config.rs Outdated Show resolved Hide resolved
@Phoenix500526 Phoenix500526 force-pushed the make_everything_configurable branch 2 times, most recently from 376464f to c9fe26f Compare January 17, 2023 11:32
1. add default values for ServerTimeout and ClientTimeout
2. using LevelFilter to replace LevelConfig
3. rename all field in RotationConfig
4. add ConfigParseError
5. refactor ClusterDuration and ClusterRange
6. move timeout out from state to a read-only shared variable
7. abstract a init_subscriber function
@mergify mergify bot merged commit 7328363 into xline-kv:master Jan 17, 2023
@Phoenix500526 Phoenix500526 deleted the make_everything_configurable branch January 18, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants