Phase 3b: thread stamped refs through claw-cargo + forwarding
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 25s
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 25s
Runner + prewarm use PutRefVersioned/GetRefVersioned; daemon GetRefVersioned forwards on miss + pulls blob transparently. New GetRefVersionedLocal (0x17) prevents recursion. Backward-compat: existing GetRef/PutRef path unchanged; two on-disk namespaces coexist (refs/ and refs-v2/). +1 test, 272 total (unchanged from 3a because we reused existing scaffolding).
This commit is contained in:
@@ -514,7 +514,25 @@ pub async fn call_get_ref_versioned(
|
||||
conn: &Connection,
|
||||
key: &crate::cluster::refs::RefKey,
|
||||
) -> Result<Option<crate::cluster::refs::StampedRef>> {
|
||||
let reply = rpc_call(conn, Method::GetRefVersioned, key).await?;
|
||||
call_get_ref_versioned_inner(conn, key, Method::GetRefVersioned).await
|
||||
}
|
||||
|
||||
/// Phase 3b (2026-07-13): strict local-only stamped-ref lookup —
|
||||
/// the peer MUST NOT recurse. Used by daemons doing ref-forwarding
|
||||
/// so they never loop.
|
||||
pub async fn call_get_ref_versioned_local(
|
||||
conn: &Connection,
|
||||
key: &crate::cluster::refs::RefKey,
|
||||
) -> Result<Option<crate::cluster::refs::StampedRef>> {
|
||||
call_get_ref_versioned_inner(conn, key, Method::GetRefVersionedLocal).await
|
||||
}
|
||||
|
||||
async fn call_get_ref_versioned_inner(
|
||||
conn: &Connection,
|
||||
key: &crate::cluster::refs::RefKey,
|
||||
method: Method,
|
||||
) -> Result<Option<crate::cluster::refs::StampedRef>> {
|
||||
let reply = rpc_call(conn, method, key).await?;
|
||||
if reply.len() == 1 {
|
||||
match decode_error(reply[0]) {
|
||||
Some(ErrorCode::NotFound) => return Ok(None),
|
||||
|
||||
Reference in New Issue
Block a user