Phase 4a hotfix: cmd_pin resolves stamped refs
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 23s
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 23s
pin lookup was legacy call_get_ref only, missing refs written via call_put_ref_versioned (all Phase 3b+ builds). Try versioned first, fall back to legacy — same pattern as claw-cargo build path.
This commit is contained in:
@@ -778,7 +778,11 @@ async fn cmd_pin(args: PinArgs) -> Result<()> {
|
|||||||
// to pin something that isn't cached yet — otherwise the tag
|
// to pin something that isn't cached yet — otherwise the tag
|
||||||
// would point at a value that no producer ever put there.
|
// would point at a value that no producer ever put there.
|
||||||
let key = *fp.as_bytes();
|
let key = *fp.as_bytes();
|
||||||
let blob_id = match call_get_ref(&conn, &key).await? {
|
let resolved_v = match call_get_ref_versioned(&conn, &key).await? {
|
||||||
|
Some(stamped) => Some(stamped.value),
|
||||||
|
None => call_get_ref(&conn, &key).await?,
|
||||||
|
};
|
||||||
|
let blob_id = match resolved_v {
|
||||||
Some(v) => BlobId::from_bytes(v),
|
Some(v) => BlobId::from_bytes(v),
|
||||||
None => {
|
None => {
|
||||||
conn.close(quinn::VarInt::from_u32(0), b"done");
|
conn.close(quinn::VarInt::from_u32(0), b"done");
|
||||||
|
|||||||
Reference in New Issue
Block a user