about summary refs log tree commit diff
path: root/tvix/castore
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-15T09·42+0300
committerclbot <clbot@tvl.fyi>2024-04-15T13·20+0000
commit456191e69e5f7abef8961ea31c0c8975faf88b8b (patch)
treeabf1318be47941339925f7188ea08a16f766a27c /tvix/castore
parent2a47ad1d902c44f3986ef1fcd7770d73d54b0904 (diff)
refactor(tvix/castore/fs): use consistent span field name for handle r/7916
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>
Diffstat (limited to 'tvix/castore')
-rw-r--r--tvix/castore/src/fs/mod.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/tvix/castore/src/fs/mod.rs b/tvix/castore/src/fs/mod.rs
index 52355bdfbe60..21c6f020abda 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<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");
             }
         }