From 456191e69e5f7abef8961ea31c0c8975faf88b8b Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 15 Apr 2024 12:42:51 +0300 Subject: 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 Tested-by: BuildkiteCI Autosubmit: flokli --- tvix/castore/src/fs/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tvix/castore/src/fs/mod.rs') diff --git a/tvix/castore/src/fs/mod.rs b/tvix/castore/src/fs/mod.rs index 52355bdfbe..21c6f020ab 100644 --- a/tvix/castore/src/fs/mod.rs +++ b/tvix/castore/src/fs/mod.rs @@ -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, ) -> 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"); } } -- cgit 1.4.1