refactor(tvix/castore/fs): use consistent span field name for handle
Use rq.handle in `release` too, and remove interpolating it into the log message itself. Also update the comment, we don't get ownership, just simply drop, and change the level to warn!, as suggested in cl/11425. Change-Id: If4e6cff6d8b580671b1548ae3862851db4af6694 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11427 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
parent
2a47ad1d90
commit
456191e69e
1 changed files with 4 additions and 5 deletions
|
@ -553,7 +553,7 @@ where
|
|||
// drop it, which will close it.
|
||||
Some(rx) => drop(rx),
|
||||
None => {
|
||||
debug!("dir handle not found");
|
||||
warn!("dir handle not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -623,7 +623,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all, fields(rq.inode = inode, fh = handle))]
|
||||
#[tracing::instrument(skip_all, fields(rq.inode = inode, rq.handle = handle))]
|
||||
fn release(
|
||||
&self,
|
||||
_ctx: &Context,
|
||||
|
@ -634,13 +634,12 @@ where
|
|||
_flock_release: bool,
|
||||
_lock_owner: Option<u64>,
|
||||
) -> io::Result<()> {
|
||||
// remove and get ownership on the blob reader
|
||||
match self.file_handles.write().remove(&handle) {
|
||||
// drop it, which will close it.
|
||||
// drop the blob reader, which will close it.
|
||||
Some(blob_reader) => drop(blob_reader),
|
||||
None => {
|
||||
// These might already be dropped if a read error occured.
|
||||
debug!("file_handle {} not found", handle);
|
||||
warn!("file handle not found");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue