Repository navigation
fix(cfg): auto-adjust max-read-ahead-kb to match fuse-max-request-size-kb when kernel reader is enabled - #5080
Conversation
…e-kb when kernel reader is enabled
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/Gemini review |
There was a problem hiding this comment.
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.
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 themax-read-ahead-kbdefault.This change:
max-read-ahead-kbtomax(max-read-ahead-kb, fuse-max-request-size-kb)whenenable-kernel-readeris enabled and the user did not explicitly setmax-read-ahead-kb.max-read-ahead-kb(via CLI or config file) even if lower thanfuse-max-request-size-kb.fuse-max-request-size-kbis lower than the default or unset.max-read-ahead-kbunchanged when the kernel reader is disabled.Link to the issue in case of a bug fix.
b/558219582
Testing details
make buildandgolangci-lint.Any backward incompatible change? If so, please explain.
N/A