Skip to content

feat: Add fs.inode.lock_acquisition span to capture parent lock waiting time during lookup#4752

Closed
kislaykishore wants to merge 2 commits into
masterfrom
trace-inode-lock-acquisition
Closed

feat: Add fs.inode.lock_acquisition span to capture parent lock waiting time during lookup#4752
kislaykishore wants to merge 2 commits into
masterfrom
trace-inode-lock-acquisition

Conversation

@kislaykishore

@kislaykishore kislaykishore commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Add a new trace span named 'fs.inode.lock_acquisition' that measures the time spent waiting to acquire a parent directory lock during lookup operations. This helps diagnose and isolate lock contention latency from GCS network latency.

Link to the issue in case of a bug fix.

b/519449727

Testing details

  1. Manual - Yes -
image
  1. Unit tests - NA
  2. Integration tests - NA

Any backward incompatible change? If so, please explain.

No

@kislaykishore kislaykishore requested a review from a team as a code owner June 3, 2026 09:22
@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Jun 3, 2026
@kislaykishore kislaykishore force-pushed the trace-inode-lock-acquisition branch from 8ee9481 to fa9adb0 Compare June 3, 2026 09:23
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the observability of the file system by adding tracing support for inode lock acquisition. By measuring the duration of lock waiting periods during lookup operations, developers can more effectively distinguish between synchronization overhead and external network latency.

Highlights

  • New Trace Span: Introduced the 'fs.inode.lock_acquisition' span to track time spent waiting for parent directory locks during lookup operations.
  • Performance Diagnostics: Enables better isolation of lock contention latency from GCS network latency in system traces.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces tracing for inode lock acquisition in the file system. Specifically, it adds a new span fs.inode.lock_acquisition to measure the time spent waiting to acquire parent locks during child inode lookup operations in lookUpOrCreateChildInode. There are no review comments, and I have no feedback to provide.

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.35165% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.05%. Comparing base (da692a3) to head (8a856e5).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/storage/debug_bucket.go 41.93% 36 Missing ⚠️
internal/fs/fs.go 69.23% 4 Missing and 4 partials ⚠️
internal/gcsx/bucket_manager.go 0.00% 1 Missing and 1 partial ⚠️
cmd/mount.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4752      +/-   ##
==========================================
+ Coverage   83.64%   84.05%   +0.40%     
==========================================
  Files         168      168              
  Lines       20775    20809      +34     
==========================================
+ Hits        17378    17490     +112     
+ Misses       2750     2665      -85     
- Partials      647      654       +7     
Flag Coverage Δ
unittests 84.05% <48.35%> (+0.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kislaykishore kislaykishore changed the title trace: Add fs.inode.lock_acquisition span to capture parent lock waiting time during lookup perf: Add fs.inode.lock_acquisition span to capture parent lock waiting time during lookup Jun 3, 2026
@kislaykishore kislaykishore changed the title perf: Add fs.inode.lock_acquisition span to capture parent lock waiting time during lookup feat: Add fs.inode.lock_acquisition span to capture parent lock waiting time during lookup Jun 3, 2026
@kislaykishore

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces tracing capabilities for GCS bucket operations and inode lock acquisitions using OpenTelemetry. The feedback highlights several critical issues, including potential nil pointer panics in internal/fs/fs.go when fs.traceHandle is nil, and consistency improvements in internal/monitor/bucket.go to use the TraceHandle abstraction. Additionally, a correction is suggested for the gcs.bucket.new_reader span, which currently tracks the entire reader lifetime instead of just its initialization.

Comment thread internal/fs/fs.go Outdated
Comment thread internal/fs/fs.go Outdated
Comment thread internal/fs/fs.go
Comment thread internal/fs/fs.go Outdated
Comment thread internal/monitor/bucket.go Outdated
Comment thread internal/monitor/bucket.go Outdated
Comment thread internal/monitor/bucket.go Outdated
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

1 similar comment
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@kislaykishore kislaykishore force-pushed the trace-inode-lock-acquisition branch from 0dd1d64 to 20a79a1 Compare June 8, 2026 05:25
@kislaykishore

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces tracing for inode lock acquisition during child inode lookup operations. It defines a new span name constant InodeLockAcquisition and adds a test suite to verify the lock acquisition tracing. The feedback suggests replacing hardcoded string literals in the test file with the newly introduced constant to maintain consistency and avoid potential issues if the span name changes.

Comment thread internal/fs/tracing_test.go
Comment thread internal/fs/tracing_test.go
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

10 similar comments
@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @vadlakondaswetha, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

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

Labels

remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant