Skip to content

[Store] Structure ShmSpdkRegistrationConfig environment settings - #4204

Open
bitborne wants to merge 1 commit into
kvcache-ai:mainfrom
bitborne:codex/shm-spdk-registration-environ-convergence
Open

bitborne wants to merge 1 commit into
kvcache-ai:mainfrom
bitborne:codex/shm-spdk-registration-environ-convergence

Conversation

@bitborne

@bitborne bitborne commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Description

Part of #3809. Extract MC_STORE_REGISTER_SPDK from shm_helper.cpp into a private, client-owned ShmSpdkRegistrationConfig and the common environment catalog. ShmHelper still reads the flag once during singleton construction, and only the exact value 1 enables registration; unset, empty, and other values remain disabled. The hugepage and SPDK registration behavior is otherwise unchanged.

The raw string preserves the original strict comparison rather than adopting a generic boolean parser. This follows the single-owner configuration boundary of merged #4165 and #4166 and complements the existing registration feature in merged #3717. Open #4179 moves the client source layout without migrating this flag; integration conflicts can be addressed if it merges first.

Module

  • Mooncake Store (mooncake-store)
  • Common (mooncake-common)

Type of Change

  • Refactor

How Has This Been Tested?

Test commands:

cmake --build build/config-check --target shm_spdk_registration_config_test --parallel 231
ctest --test-dir build/config-check -R '^shm_spdk_registration_config_test$' --output-on-failure
./scripts/code_format.sh --check --staged
pre-commit run --files mooncake-common/include/environment_variables.h mooncake-store/src/CMakeLists.txt mooncake-store/src/config/shm_spdk_registration_config.cpp mooncake-store/src/config/shm_spdk_registration_config.h mooncake-store/src/shm_helper.cpp mooncake-store/tests/CMakeLists.txt mooncake-store/tests/shm_spdk_registration_config_test.cpp

Test results:

  • Unit tests pass for the new shared-memory SPDK registration configuration.
  • Integration tests pass (if applicable)
  • Manual testing done (describe below)

The new test first failed for MC_STORE_REGISTER_SPDK=1 with the default-only implementation and passed after the configuration extraction.

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

No documentation change: the existing strict opt-in behavior is unchanged.

AI Assistance Disclosure

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

Codex assisted with ownership analysis, implementation, focused RED-to-GREEN tests, and review. The human submitter will review every changed line and is responsible for the change end to end.

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.

2 participants