feat(api): default KVCacheBackend leader.multiTenancy to true - #695
Merged
Merged
Conversation
The tenant ledger is what makes the rest of the KV cache API mean what it says: without it a KVCachePoolBinding's ceiling is recorded but not enforced, and a master serves one reuse domain only, so a second Binding on it is refused. Mooncake has taken the -enable_multi_tenants switch since 0.3.12, and the default store image is on 0.3.13.post1. The field becomes a pointer so omitting the key and writing multiTenancy: false stay different: only the explicit false renders no switch. A store image older than Mooncake 0.3.12 does not recognize the switch and its master exits at startup, so a backend on such an image, including the 0.3.10.post2 variants this project publishes, sets false here. Readers go through MultiTenancyEnabled, which reads an unset field as the schema default so an object that never passed the API server answers the same as one that did.
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 9 selected item(s). |
thxCode
added a commit
that referenced
this pull request
Sep 28, 2026
…Tenancy false (#696) #695 made leader.multiTenancy default to true, but the pool page still described the ledger-less master as the plain case. Say where a ledger-less master now comes from: a managed backend that declares leader.multiTenancy: false, which a store image older than Mooncake 0.3.12 has to, or an external master started without multi-tenancy. The omitted domain name is now the tenant the engines are handed on a multi-tenant master, so name each domain once a second Binding shares it. The kubectl example reads from a managed backend's default. Signed-off-by: thxCode <thxcode0824@gmail.com>
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.
What type of PR is this?
/kind enhancement
/kind api-change
/area worker
What this PR does / why we need it:
Defaults
KVCacheBackend'sleader.multiTenancytotrue(*boolwith+k8s:validation:default=true; every reader goes throughMultiTenancyEnabled(), which reads an unset field as the schema default, so an object that never passed the API server answers the same as one that did).The tenant ledger is what makes the rest of this API mean what it says: without it a
KVCachePoolBinding's ceiling is recorded but not enforced, and a master serves one reuse domain only, so a second Binding on it is refused. Mooncake has taken the-enable_multi_tenantsswitch since 0.3.12 — verified against the upstream tags: absent fromv0.3.10.post2andv0.3.11, present fromv0.3.12on — and the default store image is on 0.3.13.post1.KVCacheBackendhas not shipped in any release tag, so the default changes before anyone upgrades into it.Omitting the key and writing
multiTenancy: falseare now different things: only the explicit false renders no switch. A store image older than Mooncake 0.3.12 does not recognize the switch and its master exits at startup, so a backend on such an image — including the0.3.10.post2variants this project publishes — setsfalseexplicitly.Docs:
backend.mdrecords the 0.3.12 floor beside the build variants that need the opt-out, and the walkthrough's Step-1 backend now reads as the multi-tenant shape it renders.Which issue(s) this PR links to:
None.
Special notes for your reviewer:
Upgrade note: an existing
KVCacheBackendthat never set the field reads astrueunder this build, so its leader is re-rendered with-enable_multi_tenants=trueon the first reconcile after the upgrade — the leader restarts and the cached contents do not survive. A backend pinned to a store image older than Mooncake 0.3.12 must setleader.multiTenancy: falsebefore the operator is upgraded, or its master exits at startup on the unknown flag.Does this PR introduce a user-facing change?