mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[PR #1174] [CLOSED] [Store] refactor: config loading and CLI parsing by iflytek #2052
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#2052
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/Mooncake/pull/1174
Author: @cocktail828
Created: 12/6/2025
Status: ❌ Closed
Base:
main← Head:refactor_config📝 Commits (3)
b6d2cc2[Store] refactor: config loading and CLI parsinge18b634[Store] fix typos and issues raised by the AI assistant.e240c6d[Store] fix ci errors📊 Changes
23 files changed (+12721 additions, -1116 deletions)
View changed files
📝
.gitignore(+2 -0)📝
mooncake-store/CMakeLists.txt(+1 -0)➕
mooncake-store/include/CLI11/CLI11.hpp(+12045 -0)➕
mooncake-store/include/cli.h(+65 -0)📝
mooncake-store/include/client_metric.h(+0 -6)➖
mooncake-store/include/config_helper.h(+0 -98)📝
mooncake-store/include/ha_helper.h(+2 -2)📝
mooncake-store/include/master_config.h(+192 -448)📝
mooncake-store/include/master_service.h(+1 -1)📝
mooncake-store/include/rpc_service.h(+1 -1)📝
mooncake-store/include/utils.h(+23 -1)📝
mooncake-store/src/ha_helper.cpp(+7 -6)📝
mooncake-store/src/master.cpp(+137 -432)📝
mooncake-store/src/master_metric_manager.cpp(+2 -2)📝
mooncake-store/src/master_service.cpp(+9 -5)📝
mooncake-store/src/rpc_service.cpp(+3 -4)📝
mooncake-store/tests/CMakeLists.txt(+2 -0)➕
mooncake-store/tests/conf/master.conf(+4 -0)📝
mooncake-store/tests/master_metrics_test.cpp(+3 -3)📝
mooncake-store/tests/master_service_ssd_test.cpp(+4 -3)...and 3 more files
📄 Description
Description
The current command-line parsing uses gflags, which doesn't support hot updates and has limited extensibility. Additionally, the various config structure definitions and initialization code are verbose and difficult to read. Furthermore, logging has never supported persistence and always prints to screen, making it unsuitable for production environments.
This PR replaces gflags with CLI11, which allows configuration and command-line parsing to be handled together while flexibly supporting parameter deprecation mechanisms. It also makes configuration hot-reloading possible with minimal overhead - no need to write redundant code for parsing configuration files, just re-call the Parser interface. Priority mechanisms are also supported (Command Line > Configuration File > Default Values).
Additionally, duplicate code related to Master config has been refactored and streamlined. This modification significantly simplifies master-related code.
Type of Change
How Has This Been Tested?
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.