Skip to content

[Store] Structure RegisteredPinnedMemoryConfig environment settings - #3804

Merged
Aionw merged 2 commits into
kvcache-ai:mainfrom
bitborne:store/registered-pinned-memory-environ-convergence
Sep 2, 2026
Merged

Aionw merged 2 commits into
kvcache-ai:mainfrom
bitborne:store/registered-pinned-memory-environ-convergence

Conversation

@bitborne

@bitborne bitborne commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Description

Move the startup-only MC_STORE_PIN_MEMORY_MAX_BYTES setting out of the
registered pinned-memory manager and into a dedicated
RegisteredPinnedMemoryConfig.

  • define the environment variable in the common grouped catalog;
  • preserve the existing unset, empty, zero, valid, invalid, and diagnostic
    behavior;
  • make the manager consume the parsed configuration instead of reading and
    parsing the environment itself.

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 registered_pinned_memory_test -j32
ctest --test-dir build -R '^registered_pinned_memory_test$' --output-on-failure
pre-commit run --files \
  mooncake-common/include/environment_variables.h \
  mooncake-store/src/config/registered_pinned_memory_config.h \
  mooncake-store/src/config/registered_pinned_memory_config.cpp \
  mooncake-store/src/registered_pinned_memory.h \
  mooncake-store/src/registered_pinned_memory.cpp \
  mooncake-store/src/CMakeLists.txt \
  mooncake-store/tests/registered_pinned_memory_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 helped trace the existing environment semantics, implement the refactor,
add focused tests, and run formatting and review checks. I reviewed the
changes and test results.

@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

@bitborne
bitborne force-pushed the store/registered-pinned-memory-environ-convergence branch from 1bc6620 to 1e5cd0d Compare September 1, 2026 09:01
@Aionw
Aionw merged commit ebe3864 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