[Store] Structure RedisConnectionConfig environment settings - #4036
Merged
Aionw merged 2 commits intoSep 14, 2026
Merged
Conversation
Signed-off-by: Schatten <czhengt@qq.com>
bitborne
requested review from
00fish0,
Aionw,
Icedcoco,
Libotry,
XucSh,
YiXR,
stmatengss and
ykwd
as code owners
September 11, 2026 07:05
Aionw
approved these changes
Sep 11, 2026
ykwd
approved these changes
Sep 11, 2026
This was referenced Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Converges Mooncake Store's Redis connection environment settings under a private
RedisConnectionConfigas part of #3809.MC_REDIS_DB_INDEX,MC_REDIS_USERNAME, andMC_REDIS_PASSWORDin the common environment catalog.ConnectRedis()andResolveRedisDbIndex()APIs unchanged.+, exact credential text, password-gated AUTH, optional ACL username, binary-safe%bcommands, AUTH-before-SELECT ordering, existing error mapping, and Redis-disabled behavior.MC_REDIS_DB_INDEXstring-typed in the catalog only to distinguish an explicitly empty value from a nonempty malformed value, then reuses the shared typed integer parser for nonempty input.1junk,1e2, and0x1, which the previousstd::stollcall accepted by ignoring unconsumed text. The documented contract is an integer from 0 through 255, and the invalid-value path remains silent.Open PR #1538 also touches these variables as part of a broad cross-module global
Environsingleton migration. This PR is the narrow Store-only owner migration required by the current #3809 rules: it uses a component-owned private config, preserves Store diagnostics and per-connection lifecycle, adds direct RED-to-GREEN coverage, and leaves Transfer Engine and TENT readers unchanged.The optional authentication, DB selection, binary-safe command, and ACL username behaviors established by #512, #1339, #1722, and #1757 remain unchanged.
Module
mooncake-transfer-engine)mooncake-store)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Test commands:
Before the production change, the focused test passed the three preserved DB-index cases and failed the typed-contract regression for all three old prefix-acceptance inputs:
1junk,1e2, and0x1. After the change, the Redis-enabled config test passes, the Store master objects build successfully, all applicable touched-file pre-commit hooks pass with pre-commit 4.6.2, and the post-commit changed-lines check passes with clang-format 20.1.8.Test results:
Checklist
./scripts/code_format.shNo documentation update is needed: the supported contract remains an integer DB index from 0 through 255, and the normalization only removes undocumented partial-number parsing.
AI Assistance Disclosure
Codex assisted with behavior and ownership inventory, compatibility analysis, implementation, focused RED-to-GREEN tests, verification, and pre-submission review. I reviewed every changed line and can defend the change end-to-end.