fix(tvix/castore/blobs): reply to has() for chunks
We allow reading individual chunks via open_read(), it's inconsistent if a has() would return Ok(false). Change-Id: Ie713d968172ccd2687d2e6e0dfef89ee152ef511 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11420 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
f1349caf3f
commit
fb852b0245
1 changed files with 8 additions and 1 deletions
|
@ -125,7 +125,14 @@ impl BlobService for ObjectStoreBlobService {
|
||||||
|
|
||||||
match self.object_store.head(&p).await {
|
match self.object_store.head(&p).await {
|
||||||
Ok(_) => Ok(true),
|
Ok(_) => Ok(true),
|
||||||
Err(object_store::Error::NotFound { .. }) => Ok(false),
|
Err(object_store::Error::NotFound { .. }) => {
|
||||||
|
let p = derive_chunk_path(&self.base_path, digest);
|
||||||
|
match self.object_store.head(&p).await {
|
||||||
|
Ok(_) => Ok(true),
|
||||||
|
Err(object_store::Error::NotFound { .. }) => Ok(false),
|
||||||
|
Err(e) => Err(e)?,
|
||||||
|
}
|
||||||
|
}
|
||||||
Err(e) => Err(e)?,
|
Err(e) => Err(e)?,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue