Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ add_compile_options(-Wall -Wextra)
option(DFKV_BUILD_TESTS "Build dfkv tests" ON)
option(DFKV_STATIC_LIBSTDCXX "Statically link libstdc++/libgcc for portable artifacts" ON)
option(DFKV_WITH_RDMA "Build the RDMA transport (needs libibverbs)" OFF)
option(DFKV_BUILD_CYCLESTORE "Build the opt-in CycleStore coverage index" OFF)
# Additive, env-gated io_uring async-GET disk-read path in the RDMA server. When
# ON, links liburing and compiles the DFKV_WITH_URING code; the path is still
# inert unless the server is started with DFKV_SERVER_URING=1. When OFF (default)
Expand Down Expand Up @@ -67,7 +66,6 @@ endif()

# --- portable core library (everything in src/ except *_main.cc + gated rdma) ---
file(GLOB_RECURSE DFKV_SRCS CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
list(FILTER DFKV_SRCS EXCLUDE REGEX "/src/cyclestore/")
list(FILTER DFKV_SRCS EXCLUDE REGEX "_main\\.cc$")
if(NOT DFKV_WITH_RDMA)
list(REMOVE_ITEM DFKV_SRCS
Expand Down Expand Up @@ -220,9 +218,6 @@ if(DFKV_BUILD_TESTS)
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/sim_cuda)

file(GLOB_RECURSE DFKV_TESTS CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test/*_test.cc)
# CycleStore tests register with their module's own include/link scope when
# DFKV_BUILD_CYCLESTORE=ON; they never belong to generic dfkv_core targets.
list(FILTER DFKV_TESTS EXCLUDE REGEX "/test/cyclestore/")
# rdma_loopback_test needs the RDMA transport/server symbols -> RDMA build only.
list(REMOVE_ITEM DFKV_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/test/transport/rdma_loopback_test.cc)
list(REMOVE_ITEM DFKV_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/test/transport/rdma_mw_test.cc)
Expand Down Expand Up @@ -564,9 +559,3 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_RPM_PACKAGE_LICENSE "Apache-2.0")
include(CPack)

# Kept outside dfkv_core/libdfkv and disabled by default. When tests are enabled,
# this is after the repository's pinned GTest initialization above.
if(DFKV_BUILD_CYCLESTORE)
add_subdirectory(src/cyclestore)
endif()
79 changes: 0 additions & 79 deletions integration/vllm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,85 +157,6 @@ LMCache connector access logs, so one setting covers every integration. Format:
| `share_across_dp_sizes` | `false` | Leave the data-parallel size out of the object identity, so deployments of different DP sizes share objects (every DP replica writes the same bytes). Changes every key: objects stored so far are not found once after turning it on. |
| `lookup_rpc_port` | (ipc auto) | port for the rank-0 scheduler-side prefix-lookup RPC; set only if the default IPC socket name collides. |

### CycleStore shadow (default off)

`cyclestore_shadow` is a separate, observation-only namespace. Missing config or
`{"mode":"off"}` constructs no CycleStore client, starts no executor, emits no
RPC, and leaves RETAIN usage and physical LOAD/SAVE behavior unchanged. Shadow
mode requires explicit transport, audit and complete-layout configuration:

```json
"cyclestore_shadow": {
"mode": "shadow",
"controller_binary": "/path/to/dfkv_cycle_controller",
"address": "127.0.0.1:60200",
"request_dir": "/path/to/audit/requests",
"queue_capacity": 256,
"rpc_timeout_ms": 15000,
"required_contributors": ["worker:0"],
"layout": {"layout_digest": "<64-hex-stable-engine-layout-digest>"}
}
```

Requests must independently carry `kv_transfer_params.dfkv_cyclestore` with
`schema_version=1`, stable `operation_id`, authenticated `scope_id`,
`cache_domain_id`, and `requested_ttl`. `request_id` remains only `attempt_id`;
there is no silent request-id fallback. The adapter forms versioned
operation/receipt envelopes beside `dfkv_cache_usage`; it never puts logical
C'/W'/U' into RETAIN accounting, customer billing, or physical RETAIN fields.

Admission runs on every eligible reuse level, including all-local hits with no
LOAD. A commit needs **both** finalized prefill execution and every configured
full-rank/PP/KDA evidence contributor. `request_finished` and SAVE completion do
not replace either term. Production prefill notification requires the companion
`cyclestore/s4-vllm-hook` patch against the explicitly selected vLLM baseline;
unpatched upstream vLLM does not already provide this event.

MultiConnector forwards the finalized prefill event to every child **only where
that optional companion hook actually exists**, including non-preferred dfkv
children whose physical hit requires no LOAD or SAVE. Upstream MultiConnector
versions without `on_prefill_executed` are an explicitly **unsupported**
environment: the optional `DfkvMultiConnector` wrapper propagates the actual
outer parent's hook capability to its real inner `DfkvStoreConnector` (which
keeps its own name), then admission fixes `unsupported_prefill_hook` after
physical lookup, never a prefill fallback/new operation/Commit. Choosing plain
MultiConnector without such parent-boundary compatibility does not make it
supported. Direct connector behavior and unrelated
RETAIN traffic are unchanged. Tests that
exercise a positive Multi fan-out must use the real companion or an equivalently
reviewed test-only forwarder; injected support does not imply upstream support.
`physical.write_tokens` and `committed_complete_pages` come from terminal
physical completion evidence, never `candidate_pages * page_size`; a full
physical hit with zero SAVE writes zero tokens. Logical cached must not exceed
physical cached, and positive FINAL receipts require logicalCommitApplied plus
an allowlisted outcome, aligned path identity, digest, apply and accepted data.

Finished journals bind scope/domain/root, the complete lookup request digest,
canonical/full-page evidence digests, original prefill and immutable publication.
A reused attempt id with another operation is rejected before any new RPC. Commit
transport loss replays exactly the original token/path/prefill for at most three
attempts; pending retry evidence can be recovered by a fresh coordinator, while
close never reopens it. Response audit-write errors are separate degradation
markers and cannot erase a received response. A monotonic worker enforces the
publication deadline without another admission poll. PD consumers emit only a
reference with `publication_emitted=false`; this does not claim producer envelope
transport or Msh streaming support.

The current client always sends complete `PathEvidence` for server validation;
it does not claim `EvidenceCapability` reuse, invented digest-cache verification,
or capability-client support. Full-evidence remains its required fallback path.
`LookupTokenPayload.requestedTtl` must match the requested enum before lookup
projection is accepted; unknown/clock/leader failures stay transport-unknown.

Each RPC currently invokes the same S3 C++ protobuf-JSON CLI in a fresh process;
no Python brpc binding is claimed. This favors wire fidelity over scheduler
startup latency; resident-client optimization and a performance/latency gate
were **not** implemented or measured. Lookup/transport failure degrades shadow
state to unknown without changing physical behavior. Late receipts are reconcile
records only and never rewrite the first publication. Chat streaming's existing
final usage chunk has no `kv_transfer_params`; this adapter does **not** claim
Msh headers or the Chat-streaming Router/Nexus path is connected.

Transfer threads are shut down through vLLM's connector `shutdown()` lifecycle
hook. Shutdown stops admission, cancels queued transfers with the same visible
save/load outcomes described above, waits for active native operations, joins
Expand Down
24 changes: 0 additions & 24 deletions integration/vllm/src/dfkv_vllm/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,30 +280,6 @@ def build_connector_meta(
finally:
self._finish_call()

def on_prefill_executed(self, request: Request, prefill_stats: Any) -> None:
"""Companion vLLM core hook; not present in unpatched upstream cores."""
self._begin_call()
try:
assert self.connector_scheduler is not None
self.connector_scheduler.on_prefill_executed(request, prefill_stats)
finally:
self._finish_call()

def mark_cyclestore_evidence_ready(
self, request_id: str, contributor: str, complete_pages: int,
physical_evidence_digest: bytes, put_completed_tokens: int | None = None,
committed_complete_pages: int | None = None, put_failed_tokens: int = 0,
) -> None:
"""Ingress for the operation-level full-rank/PP/KDA evidence aggregator."""
self._begin_call()
try:
assert self.connector_scheduler is not None
self.connector_scheduler.mark_cyclestore_evidence_ready(
request_id, contributor, complete_pages, physical_evidence_digest,
put_completed_tokens, committed_complete_pages, put_failed_tokens)
finally:
self._finish_call()

def request_finished(
self,
request: Request,
Expand Down
38 changes: 0 additions & 38 deletions integration/vllm/src/dfkv_vllm/cyclestore_multi_connector.py

This file was deleted.

Loading