feat(tvix/castore): fix tracing instrument in MemoryBlobService
Change-Id: Iedba57e8b3e1a44f14f5baa1e981275d4b02eb56 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10070 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
parent
68e473ed6b
commit
df63b719ac
1 changed files with 3 additions and 2 deletions
|
@ -17,12 +17,13 @@ pub struct MemoryBlobService {
|
|||
|
||||
#[async_trait]
|
||||
impl BlobService for MemoryBlobService {
|
||||
#[instrument(skip(self, digest), fields(blob.digest=%digest))]
|
||||
#[instrument(skip_all, ret, err, fields(blob.digest=%digest))]
|
||||
async fn has(&self, digest: &B3Digest) -> Result<bool, Error> {
|
||||
let db = self.db.read().unwrap();
|
||||
Ok(db.contains_key(digest))
|
||||
}
|
||||
|
||||
#[instrument(skip_all, err, fields(blob.digest=%digest))]
|
||||
async fn open_read(&self, digest: &B3Digest) -> Result<Option<Box<dyn BlobReader>>, Error> {
|
||||
let db = self.db.read().unwrap();
|
||||
|
||||
|
@ -32,7 +33,7 @@ impl BlobService for MemoryBlobService {
|
|||
}
|
||||
}
|
||||
|
||||
#[instrument(skip(self))]
|
||||
#[instrument(skip_all)]
|
||||
async fn open_write(&self) -> Box<dyn BlobWriter> {
|
||||
Box::new(MemoryBlobWriter::new(self.db.clone()))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue