Skip to content

fix(cfg): auto-adjust max-read-ahead-kb to match fuse-max-request-size-kb when kernel reader is enabled - #5080

Merged
kislaykishore merged 5 commits into
masterfrom
fix-kernel-reader-max-read-ahead
Sep 8, 2026
Merged

kislaykishore merged 5 commits into
masterfrom
fix-kernel-reader-max-read-ahead

Conversation

@kislaykishore

@kislaykishore kislaykishore commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Description

When kernel reader is enabled and a user sets a large fuse-max-request-size-kb (e.g. 255 MiB), GCSFuse kernel read calls were previously limited to 128 MiB for regional buckets due to constraints from the max-read-ahead-kb default.

This change:

  • Automatically adjusts max-read-ahead-kb to max(max-read-ahead-kb, fuse-max-request-size-kb) when enable-kernel-reader is enabled and the user did not explicitly set max-read-ahead-kb.
  • Preserves explicit user configuration of max-read-ahead-kb (via CLI or config file) even if lower than fuse-max-request-size-kb.
  • Retains existing default read-ahead values when fuse-max-request-size-kb is lower than the default or unset.
  • Leaves max-read-ahead-kb unchanged when the kernel reader is disabled.

Link to the issue in case of a bug fix.

b/558219582

Testing details

  1. Manual - Verified compilation, format, and static analysis via make build and golangci-lint.
  2. Unit tests - Added unit tests
  3. Integration tests - Tested the behavior using Tessellations checkpoint benchmark.

Any backward incompatible change? If so, please explain.

N/A

@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 a new configuration rationalization step, resolveKernelReadAhead, which automatically adjusts max-read-ahead-kb to match fuse-max-request-size-kb when the kernel reader is enabled, unless max-read-ahead-kb has been explicitly configured by the user. Comprehensive unit and integration tests have been added to verify this behavior across CLI flags, configuration files, and bucket-type optimizations. There are no review comments, so I have no feedback to provide.

@codecov

codecov Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.79%. Comparing base (6298118) to head (356158c).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5080       +/-   ##
===========================================
+ Coverage        0   86.79%   +86.79%     
===========================================
  Files           0      176      +176     
  Lines           0    18861    +18861     
===========================================
+ Hits            0    16370    +16370     
- Misses          0     2490     +2490     
- Partials        0        1        +1     
Flag Coverage Δ
unittests 86.79% <100.00%> (?)

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

☔ View full report in Codecov by Harness.
📢 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 added the execute-integration-tests Run only integration tests label Sep 8, 2026
@kislaykishore
kislaykishore marked this pull request as ready for review September 8, 2026 07:42
@kislaykishore
kislaykishore requested a review from a team as a code owner September 8, 2026 07:42
@kislaykishore
kislaykishore requested a review from geertj September 8, 2026 07:42
@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Sep 8, 2026
Comment thread cmd/config_rationalization_test.go Resolved
Comment thread cfg/rationalize_test.go Resolved
Comment thread cfg/rationalize.go Resolved
Comment thread cmd/config_rationalization_test.go Resolved
@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 automatic adjustment of the max-read-ahead-kb configuration to match fuse-max-request-size-kb when the kernel reader is enabled, unless the user has explicitly configured it. It updates the CLI flag descriptions, adds validation to ensure max-read-ahead-kb is non-negative, and includes comprehensive unit and integration tests to verify the rationalization and validation logic. I have no feedback to provide as the implementation is robust and well-tested.

@abhishek10004 abhishek10004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@kislaykishore
kislaykishore merged commit 78edcaa into master Sep 8, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

execute-integration-tests Run only integration tests 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.

2 participants

⌂ 换网址