Repository navigation
Conversation
Without liburma, createDefaultUrmaAdapter() returns an unavailable stub, so topology discovery finds no UB NIC and transport_loader never builds UbTransport. Store tests with MC_USE_TENT=1 then silently run on TCP and never exercise the TENT UB path. Add an in-process loopback URMA adapter that copies READ/WRITE data with memcpy, and let the default factory return it in test-only builds: - New CMake option USE_UB_MOCK (OFF by default, requires USE_UB). When ON, tests/ub_mock/loopback_urma_adapter.cpp is compiled into tent_xport_ub with TENT_UB_MOCK_ADAPTER=1. Normal builds are unchanged. - createDefaultUrmaAdapter() returns the loopback adapter only in such a build and only when MC_TENT_UB_MOCK=1 is set, so other tests in a mock build still see no UB device. - The adapter reports one device (ub:mock0:eid0), bounds-checks every WR against its local and remote segments, and keeps process-wide counters so tests can check that data went through UB. Tests: - tent_ub_loopback_engine_test: two in-process TENT engines with only UB enabled; 4 MiB write/read with byte checks, an unhinted batch that must pick UB, and an out-of-range write that must not complete. - client_integration_ub_mock_test: client_integration_test with --protocol=ub, MC_USE_TENT=1, MC_TENT_UB_MOCK=1 and every other data transport disabled through MC_TENT_CONF. The two tests/CMakeLists.txt files also pick up cmake-format whitespace changes on lines this commit does not otherwise touch. Tested in a Linux arm64 container (Debug, USE_TENT, USE_UB, USE_UB_MOCK, WITH_STORE, no liburma) on main 48aa86c: - tent_ub_* tests: 4/4 pass; tent_ub_loopback_engine_test 30/30 repeats. - client_integration_ub_mock_test: 33 pass, 6 checksum cases skip, BatchQueryIpOperations fails because TENT reports the container IP instead of 127.0.0.1; it fails the same way with MC_USE_TENT=1 alone. - TENT tests: 70/71 pass; transfer_engine_config_override_test fails the same 4 cases as on main in this container. - Existing Store TENT ctests (5): all pass. Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
client_integration_ub_mock_test relied on every non-UB transport being disabled to show that data went through TENT UB. Add a direct check: UbMockCarriesPutAndGet resets the loopback adapter's counters, puts and gets a 1 MiB object, and expects UB write and read requests with at least 1 MiB moved each way, plus a byte-for-byte match. The case is compiled only when USE_TENT and USE_UB_MOCK are on, and skips unless MC_TENT_UB_MOCK is set. Tested in the ub-mock container build: - client_integration_ub_mock_test: new case passes (5/5 repeats); suite otherwise unchanged (only BatchQueryIpOperations fails, 6 skips). - Without MC_TENT_UB_MOCK the case is skipped. - With TCP enabled and UB disabled, Put/Get succeed but the case fails on all four counter expectations, so it catches a non-UB data path. Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
Keep mmap-backed segments on the munmap teardown path even when the Store protocol is UB. Add a UB mock regression test that checks the hugepages are released after client teardown. Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
TENT picks the data transport itself, and its UB transport is off unless transports/ub/enable is set. A Store client started with MC_USE_TENT=1 and protocol=ub therefore came up without error and carried its data over TCP. - Add tent::TransferEngine::hasTransport(TransportType), which reports whether a transport was loaded and installed. - In TENT mode, Client::InitTransferEngine now returns INTERNAL_ERROR for protocol=ub when the UB transport is missing, and logs how to enable it. The classic (non-TENT) UB path is unchanged. Behavior change: MC_USE_TENT=1 with protocol=ub and UB disabled used to start on TCP and now fails to start. Tested in the ub-mock container build (USE_TENT, USE_UB, USE_UB_MOCK): - tent_ub_loopback_engine_test: new ReportsInstalledTransports passes. - client_integration_ub_mock_test: new UbRequestedWithoutTentUbTransportFails passes. The suite passed 2 of 3 runs; the third failed BasicPutGetOperations and UpsertNewKey with OBJECT_HAS_LEASE, existing cases that Remove right after sleeping one lease TTL. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
No workflow built with USE_UB_MOCK, so the TENT UB loopback tests and the Store tests on top of it only ran locally. - tent-ci (ub-mock): add -DUSE_UB_MOCK=ON, turn Store on, and build the transfer engine tree plus client_integration_test and real_client_hugepage_register_test. - Add a step that runs client_integration_ub_mock_test and real_client_hugepage_ub_mock_test. tent_ub_loopback_engine_test is picked up by the existing TENT test step. - Leave BatchQueryIpOperations out of client_integration_ub_mock_test: it expects a loopback address, but TENT advertises the host NIC address with any transport. The workflow change has not run on GitHub Actions yet. The hugepage case skips itself if the runner grants no hugepages. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
# Conflicts: # mooncake-store/tests/client_integration_test.cpp # mooncake-store/tests/real_client_hugepage_register_test.cpp
Signed-off-by: zchuango <zchuang185@gmail.com>
Signed-off-by: zchuango <zchuang185@gmail.com>
zchuango
force-pushed
the
ub/tent-store
branch
from
November 20, 2026 08:30
0bd21ef to
aaa93dc
Compare
…#5525) * [TENT] Add an array entry point for synchronous transfers A batch of transfer descriptors reaches the engine as a list of Request objects: the caller builds one Python object per descriptor and pybind copies the list into a std::vector, so a batch of a few thousand ranges spends most of its time in that conversion. transfer_sync_arrays takes the descriptors as three 1-D uint64 arrays (src, dst, lengths), submits one batch, waits for it with the GIL released, and returns one uint8 terminal state per entry. It waits until every descriptor is terminal and takes no timeout; a caller that needs one uses submit_transfer and wait_transfer with a batch it owns. Arrays with a wrong dtype, wrong rank, non-unit stride or mismatched lengths are rejected without touching the engine, and failed submissions stay INVALID. Tested with a new Python test that covers the malformed inputs and moves bytes between two engines over TCP, registered with CTest. Signed-off-by: CAICAIIs <3360776475@qq.com> * [TENT] Reject malformed empty inputs and surface wait failures transfer_sync_arrays treated every empty array as a successful zero-range call: an empty float64 array, an empty two-dimensional array, or an empty source with a non-empty target all returned a zero-length status array. Validate such inputs and raise InvalidArgumentError, while keeping a batch of three empty uint64 vectors as a no-op. The wait result was discarded, so a failed wait or a status list of the wrong length still looked like successful submission with INVALID states. Check both and raise InternalError instead of returning the array. Signed-off-by: CAICAIIs <3360776475@qq.com> * [TENT] Cancel and settle a failed transfer_sync_arrays batch The batch guard frees the batch on scope exit, and freeBatch defers while tasks are still pending: the transport can keep reading or writing the caller's buffers after the call has raised. Cancel every task and wait up to 250 ms for a terminal state before letting the guard free the batch, and say so in the error when the batch stays pending, because a caller cannot wait on a batch it does not own. The same cleanup now runs when submitTransfer is rejected, since a rejected submit can leave part of the batch in flight. Signed-off-by: CAICAIIs <3360776475@qq.com> * [TENT] Cancel and settle a batch in the engine transfer_sync_arrays used to leave buffers owned by the transport when the wait failed: freeBatch defers releasing a batch whose tasks are still pending, and the caller has no batch id to wait on. Add TransferEngine::cancelAndWait(batch_id, timeout_ms): it stops admitting queued owners, cancels the in-flight tasks, refills the dispatch window once and polls until every task leaves PENDING or the timeout expires. The Python entry point calls it after a failed submit or wait and reports InternalError when the batch could not be settled, so buffers stay untouched until tasks report a final state. Verified on qjh000: 23 dispatch, 12 lifecycle, 5 poll backoff and 3 delegate rpc tests pass; the 9 array binding tests pass. Signed-off-by: CAICAIIs <3360776475@qq.com> * [TENT] Settle failed array transfers with waitTransfer The settle logic does not need its own public entry point: waitTransfer already cancels queued owners, asks in-flight tasks to stop and reports the final per-descriptor states. Call it again with a short timeout after a failed submit or wait, and treat an empty status list as "nothing was published". This removes the cancelAndWait API added by the previous commit and keeps the binding as the only caller of the settle path. Signed-off-by: CAICAIIs <3360776475@qq.com> * [TENT] Base the settle window on the transport retry budget The failure path waited a fixed 250 ms for cancelled tasks to stop, which does not cover the QP retry timer. With the default send_timeout (14) and send_retry_count (7) one task can take ~540 ms to drain, so a batch that settled inside 250 ms was not the worst case the check claimed to cover. Wait one full retry budget (600 ms) instead, so a settled batch means the transport is actually done. The docstring no longer quotes an unexplained number. Signed-off-by: CAICAIIs <3360776475@qq.com> * [TENT] Report slot exhaustion and tighten the settle path - Raise TooManyRequests instead of returning all-INVALID when no batch slot is free; the result previously looked like malformed input. - Treat a short settle status list as not settled instead of safe. - Stop appending a second location marker to errors that already carry one. - Describe the 600 ms budget as a wait for completion; cancellation only happens at the deadline. - Use None as the segment sentinel in the write/read test. Signed-off-by: CAICAIIs <3360776475@qq.com> --------- Signed-off-by: CAICAIIs <3360776475@qq.com>
* [Conductor] Add Go RPC client and C ABI bindings Signed-off-by: w00593015 <wanghaibo33@huawei.com> * [Conductor] Keep negative RPC timeouts as "no timeout" ConductorClient::Setup rejected every non-positive timeout, so a negative value, which previously disabled the ylt timer, started failing with INVALID_PARAMS for Python, Rust, and C callers. Accept negative timeouts again and clamp them to -1 so ylt's nanosecond conversion cannot overflow. Keep rejecting 0, which expires at once, and values above INT64_MAX / 1000000 ms. - Go maps a negative Duration to -1 instead of returning InvalidParams. - Rust rounds sub-millisecond durations up, so a nonzero Duration never becomes the rejected 0 ms. - Document the accepted range in the C and C++ headers and the Rust ClientConfig. - Cover 0, out-of-range, -1, and INT64_MIN in the C ABI test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Chase Rong <lolopop.rong@gmail.com> * [Conductor] Nest root_digest in the Go service hash profile RegisteredService embedded ServiceConfig and carried RootDigest at the top level. Rust ServiceInfo, the Python services dict, and Go ContextView all keep root_digest inside the hash profile. Give RegisteredService its own fields with a ResolvedHashProfile, and share the C-to-Go hash profile conversion between ListServices and GetGlobalView. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Chase Rong <lolopop.rong@gmail.com> --------- Signed-off-by: w00593015 <wanghaibo33@huawei.com> Signed-off-by: Chase Rong <lolopop.rong@gmail.com> Co-authored-by: w00593015 <wanghaibo33@huawei.com> Co-authored-by: Chase Rong <lolopop.rong@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…i#5725) Signed-off-by: Himanshu Jaju <hj@mistral.ai>
…ad (kvcache-ai#5698) Preserve the 1000 ms default, allow 0 for first-transfer measurements, reuse the validated payload size, and reserve each per-transfer request vector in both backends. Signed-off-by: wuyaole <112309453+LeslieWylie@users.noreply.github.com> Co-authored-by: wuyaole <112309453+LeslieWylie@users.noreply.github.com>
…ache-ai#5686) * [Doc] Add logos and links to the ecosystem integration directory Give each integration a linked logo and point every project name at its upstream repository, including integrations that are still open pull requests. --------- Signed-off-by: Teng Ma <stmatengss@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Enflame GCU support landed in kvcache-ai#5383, but the README hardware overview still omitted the vendor. Signed-off-by: Teng Ma <stmatengss@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Picks up kvcache-ai#5725, which fixes the master_service_ha_test build break that failed CTest on kvcache-ai#5703. Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Description
Suggested Merge Priority
Module
mooncake-transfer-engine)mooncake-store)mooncake-conductor)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:
# Example: bash scripts/run_ci_test.shTest results:
Checklist
Signed-off-bytrailer certifying the DCO./scripts/code_format.shAI Assistance Disclosure