Skip to content

Conversation

@mansi153
Copy link
Contributor

@mansi153 mansi153 commented Dec 4, 2025

Add requester's PID to Filesystem logs.
It also adds an entry point "New request" log to all the (supported) filesystem methods as a proxy for tracking incoming requests at FUSER.

This makes it easier to trace requests dispatched to Mountpoint, especially during workflows using multiple customer processes to make requests concurrently for the same inode(s).

Additionally, the commit adds/re-orders some other fields in the logs (for a few FS methods) to reattain a consistent order of logging request parameters.

Sample log:

2025-12-04T14:56:23.330127Z DEBUG ThreadId(11) lookup{req=3 ino=1 name="._." pid=1860}:head_object{id=3 bucket="multinictesting-iad-benchmarksetupbucket07d0221d-jc1kskgzz2gx" key="._."}: mountpoint_s3_client::s3_crt_client::head_object: new request

The commit also does some minor refactoring to name unused method parameters more consistent and adhering to Rust guidelines.

Does this change impact existing behavior?

No, only (warn-level and higher) logging change.
No breaking changes.

Does this change need a changelog entry? Does it require a version change?

No, and no.
Logging change only.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't touch -fuser unless we are really confident its required. The goal is to minimize the divergence from the upstream crate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, should I PR to the upstream then? I feel it is important to track and make sense of incoming requests especially during situations with multiple (potentially) conflicting operations happening on an inode at the same time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need it? We are already instrumenting all the methods in mountpoint-s3-fs::fuse::S3FuseFilesystem with PID?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I have undone the changes to -fuser.
Instead, added a "new request" debug log at the point when the Fuse request reaches the -fs implementations so we (hopefully) don't have to wait for a log later in the request path to deduce the order of executions.

Comment on lines 207 to 215
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add name here, we don't ever emit it?

What's the consequence of adding name when not set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is we emit the name in a similar format across other FS methods too, so I tried to make it consistent across the board. It would default to a blank string if not set, but I haven't looked into where it gets set. I'll check and remove the name from the log if it's not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the name field in readdir/readidrplus since it seems a bit unnecessary to scope in fixing logging in specific methods as part of this PR - although I feel it would be nice to reach a state of consistent logging format for our FS requests.

Mansi Pandey added 2 commits January 7, 2026 12:55
The commit also does some minor refactoring to name unused method parameters more consistent and adhering to Rust guidelines.

Signed-off-by: Mansi Pandey <[email protected]>
@mansi153 mansi153 requested a deployment to PR integration tests January 7, 2026 12:59 — with GitHub Actions Waiting
@mansi153 mansi153 changed the title Add requester process's PID to Fuse logs and FS logs Add requester process's PID to Filesystem logs Jan 7, 2026
Signed-off-by: Mansi Pandey <[email protected]>
@mansi153 mansi153 temporarily deployed to PR integration tests January 7, 2026 13:14 — with GitHub Actions Inactive
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good. It does need a new version and a short entry in the changelog.

#[instrument(level="warn", skip_all, fields(req=req.unique(), ino=parent, name=?name))]
#[instrument(level="warn", skip_all, fields(req=req.unique(), ino=parent, name=?name, pid=req.pid()))]
fn lookup(&self, req: &Request<'_>, parent: InodeNo, name: &OsStr, reply: ReplyEntry) {
debug!("New request");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants