Skip to content

[Store] Structure LocalHotCacheConfig environment settings - #3781

Merged
Aionw merged 2 commits into
kvcache-ai:mainfrom
bitborne:store/local-hot-cache-environ-convergence
Sep 2, 2026
Merged

Aionw merged 2 commits into
kvcache-ai:mainfrom
bitborne:store/local-hot-cache-environ-convergence

Conversation

@bitborne

@bitborne bitborne commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Structure the local hot cache environment settings by grouping their definitions in mooncake-common and moving their parsing and fallback behavior into LocalHotCacheConfig::FromEnvironment(). Client::InitLocalHotCache() now consumes the parsed configuration while retaining ownership of cache allocation, Transfer Engine registration, and handler initialization.

This preserves the existing defaults, environment precedence, permissive numeric-prefix parsing, warning messages, checksum short-circuit, and exact "1" behavior for shared memory. Direct configuration tests cover unset, valid, empty, zero, negative, malformed, overflow, legacy numeric-prefix, admission-threshold, and shared-memory values.

Module

  • Transfer Engine (mooncake-transfer-engine)
  • Mooncake Store (mooncake-store)
  • Reshard (mooncake-reshard)
  • Mooncake EP (mooncake-ep)
  • Mooncake PG (mooncake-pg)
  • Integration (mooncake-integration)
  • P2P Store (mooncake-p2p-store)
  • Python Wheel (mooncake-wheel)
  • Common (mooncake-common)
  • Mooncake RL (mooncake-rl)
  • CI/CD
  • Docs
  • Other

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation update
  • Performance improvement
  • Other

How Has This Been Tested?

Test commands:

cmake --build build --target local_hot_cache_config_test client_local_hot_cache_test dummy_client_get_buffer_test -j32
ctest --test-dir build -R '^(local_hot_cache_config_test|client_local_hot_cache_test|dummy_client_get_buffer_test)$' --output-on-failure
pre-commit run --files mooncake-common/include/environment_variables.h mooncake-store/include/client_service.h mooncake-store/include/local_hot_cache.h mooncake-store/src/CMakeLists.txt mooncake-store/src/client_service.cpp mooncake-store/src/config/local_hot_cache_config.cpp mooncake-store/tests/CMakeLists.txt mooncake-store/tests/local_hot_cache_config_test.cpp

Test results:

  • Unit tests pass
  • Integration tests pass (if applicable)
  • Manual testing done (describe below)

Checklist

  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh
  • I have run pre-commit on the files changed in this PR and all hooks pass
  • I have updated the documentation (if applicable)
  • I have added tests to prove my changes are effective
  • For changes >500 LOC: I have filed an RFC issue

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used (specify below)

Codex was used to inspect the existing environment behavior, implement the refactor and tests, run focused validation, and review the diff. I reviewed the changes and remain responsible for the contribution.

@Aionw Aionw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Schatten <czhengt@qq.com>
@bitborne
bitborne force-pushed the store/local-hot-cache-environ-convergence branch from 9342bbf to f9e68ab Compare September 1, 2026 08:13
@Aionw
Aionw merged commit 1d760de into kvcache-ai:main Sep 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants