diqiu50 commented on code in PR #5905: URL: https://github.com/apache/gravitino/pull/5905#discussion_r1893351125
########## clients/filesystem-fuse/src/fuse_api_handle.rs: ########## @@ -30,10 +30,174 @@ use fuse3::{Errno, FileType, Inode, SetAttr, Timestamp}; use futures_util::stream; use futures_util::stream::BoxStream; use futures_util::StreamExt; +use log::debug; use std::ffi::{OsStr, OsString}; use std::num::NonZeroU32; use std::time::{Duration, SystemTime}; +pub(crate) struct FuseApiHandleDebug<T: RawFileSystem> { + inner: FuseApiHandle<T>, +} + +impl<T: RawFileSystem> FuseApiHandleDebug<T> { + pub fn new(fs: T, context: FileSystemContext) -> Self { + Self { + inner: FuseApiHandle::new(fs, context), + } + } + + pub async fn get_file_path(&self, file_id: u64) -> String { + debug!("get_file_path: file_id: {}", file_id); + let result = self.inner.get_file_path(file_id).await; + debug!("get_file_path result: {}", result); + result + } + + async fn get_modified_file_stat( + &self, + file_id: u64, + size: Option<u64>, + atime: Option<Timestamp>, + mtime: Option<Timestamp>, + ) -> Result<FileStat, Errno> { + debug!("get_modified_file_stat: file_id: {}, size: {:?}, atime: {:?}, mtime: {:?}", file_id, size, atime, mtime); Review Comment: It’s best to convert file_id to a file path to improve readability, for example, "/a/b.txt(2342)". Other variables should follow a similar approach. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org