Repository navigation
[TENT] Integrate TENT 4 receiver credit on current upstream main - #54
Closed
Connor-Matthew wants to merge 14 commits into
Closed
Connor-Matthew wants to merge 14 commits into
Connor-Matthew wants to merge 14 commits into
Conversation
…4314) * [Store] Add LastHitOnly lease selection to BatchProbeKey Select and lease only the last complete request-scoped candidate, returning a selected-only mask. Preserve lease-free default probes and existing existence APIs. Thread the policy through both RPC boundaries and Python, with lease, tenant, shared-group and concurrency coverage. Batch-probe RPC signatures change; participating components must upgrade together. Implements the Store portion of RFC kvcache-ai#4255. * [Store] Use string_view for probe validation errors
…vcache-ai#4659) Signed-off-by: Teng Ma <stmatengss@gmail.com>
…e-ai#4729) kvcache-ai#4314 added the GrantLeasePolicy parameter to MasterService::BatchProbeKey but missed this call site, which breaks the tent build. Pass the default {} policy: ProbeLeaseMode::None preserves the lease-free existence probe the scenario expects.
…e RPC (kvcache-ai#4704) setupConnectionsByActive() held the endpoint RWSpinlock across the transfer-metadata handshake RPC. The handshake is reciprocal: the peer's passive handler must take the same lock on its own endpoint, so a bilateral active setup (both sides dialing at once) deadlocked. Serialize active setup with a dedicated mutex that passive handlers never take, and hold the state lock only while reading local state and while publishing the reply, so three properties hold: - Active callers are serialized into one handshake RPC; the state lock is released while the RPC is in flight. - A reply that crosses a disconnect, a nic-path change or endpoint teardown is stale: a generation counter, bumped on every disconnect/path change, rejects it instead of publishing a connection against dead state. - A passive handshake that connected the endpoint while the RPC was in flight wins: the active caller returns success and discards its own reply, even if the RPC failed or the generation moved. Also qualify efa_context.h includes as "transport/efa_transport/efa_context.h" so the endpoint header can be included from tests that shadow the context boundary (tests/efa_endpoint_handshake_test.cpp compiles the real endpoint source against a scripted RPC/address-vector fake and runs without an EFA device).
… page (kvcache-ai#4693) --------- Co-authored-by: Ke Yang <yangke@approaching.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
…yout (kvcache-ai#4689) * Move feature page to store-rs * Move store-rs build guide to the build file * Highlight the title of store-rs toubleshooting * Address review comments --------- Co-authored-by: Ke Yang <yangke@approaching.ai>
Co-authored-by: Daegyu Han <daegyu13.han@gmail.com>
Co-authored-by: 2xdevv <2xdevv@gmail.com>
) The leadership lease TTL was hard-coded to DEFAULT_MASTER_VIEW_LEASE_TTL_SEC (5 s) in the etcd coordinator. An etcd apply stall of about that length makes the leader miss a keepalive and step down, so clusters with observed slow applies cannot ride such stalls out. Add --ha_leader_lease_ttl_sec (default 5, allowed range 2..60, also read from the JSON config as ha_leader_lease_ttl_sec) and thread it through MasterConfig, MasterServiceSupervisorConfig and HABackendSpec to the etcd coordinator's GrantLease call. The effective value is logged at startup. The floor is 2 s because etcd raises smaller lease TTLs to 2 s with its default settings. The default keeps the existing behavior; the Redis and k8s backends do not use the flag. Document the flag in the Mooncake Store deployment guide. A longer TTL trades failover latency for stall tolerance: a new leader still waits one full TTL in warmup before serving (fencing against the old leader), and after a leader crash the standby waits for the old lease to expire.
…er (kvcache-ai#4688) Signed-off-by: Xucheng Zhou <aden1350@outlook.com>
(cherry picked from commit d78e20d)
15 of 21 tasks
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.
Superseded by #55 after the source branch was renamed to
ub/tent4-integration. This PR was closed without merging.Description
Migrate only original TENT 4 commit
d78e20dd3f9568c8223fbdbb3e98e00f6ed34c67onto officialkvcache-ai/Mooncakemain at1a6d00d0f4dc7f54c573c5fcd4ff5f80bd1f2813, after TENT 3 landed upstream in kvcache-ai#4605.This adds receiver-credit authority/exchange, runtime dispatch gating, transport session fences, staging propagation, and the native UB validation guide. Conflict resolution preserves current-main cancellation, safe TCP retry, payload limits, registered-memory permissions, copy-error propagation, runtime policy snapshots and submit-stage failover. Required-credit scatter submissions are rejected explicitly because scatter bypasses the credit-owning runtime queue; a regression test covers the rejection before transport handoff. A separate migration compatibility fix validates the receiver session/epoch against the pinned HP TCP metadata before initial or retry handoff, with missing/stale/version/flags rejection and matching-session success coverage. HP TCP was introduced upstream after the original TENT 4 snapshot.
Related design discussions: kvcache-ai#2849 (receiver-advertised credits, closed historical RFC) and kvcache-ai#3093 (native UB/URMA). This is TENT 4 follow-up work, distinct from the existing TENT 3 integration PR #53 and native UB/bonding PR #40. No duplicate TENT 4 PR was open when checked.
Base note: this fork's
mainis 12 official commits behind the selected official baseline. Those commits are existing upstream history; the new commits on top of official main are the migrated TENT 4 change and the HP TCP compatibility fix. No fork-main synchronization or merge is performed by this PR.Validation PR: do not merge. Keep draft until CI, human review, and the owner's two-node UB traffic/data-integrity validation finish.
Suggested Merge Priority
Module
mooncake-transfer-engine)Type of Change
How Has This Been Tested?
Test commands:
Test results: 26 receiver-credit + 50 admission-queue + 11 request-merge tests pass (87 total). Before migration, the official baseline passed its 14 receiver-credit + 43 admission-queue tests. Documentation HTML builds successfully and the changed pages/navigation were inspected. All applicable pre-commit hooks pass, including clang-format 20.1.8 on changed lines and codespell.
Checklist
./scripts/code_format.shvia the pre-commit hookAI Assistance Disclosure
Codex migrated the original commit, resolved conflicts against current main, added the scatter compatibility guard/regression, and ran the available local checks. Independent Codex agents reviewed migration risks. The human submitter's full review and hardware validation remain pending; this PR must stay unmerged.