feat: add experimental large directory warning threshold#4736
feat: add experimental large directory warning threshold#4736Haihan-Jiang wants to merge 1 commit into
Conversation
Summary of ChangesHello, 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 introduces an experimental monitoring feature that allows users to log warnings when directory listings exceed a specified entry count. By adding a configurable threshold, the system provides visibility into large directory structures without altering core write-path behaviors, addressing the signal requirements for tracking large directory performance. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces an experimental configuration option, experimental-large-dir-warning-threshold, which logs a warning when a directory listing contains at least the specified number of entries. It adds the configuration parameter, CLI flag, validation logic, unit tests, and the core implementation in DirHandle to check and log the warning during directory read operations. I have no feedback to provide as there are no review comments.
|
This is ready for review from my side. The title check has a later successful run after the initial failure, and the other visible checks are green. Could someone take a look when convenient? |
What
Adds a hidden experimental
--experimental-large-dir-warning-thresholdflag / config field underfile-system. When the threshold is greater than zero, directory reads log a warning after the final directory entry list reaches or exceeds the threshold. A value of0keeps the behavior disabled.This covers the warning signal requested in #4696 without changing write-path behavior or claiming to solve the full large-directory guard/streaming work.
Validation
go test ./cfgdocker run --rm -v "$PWD":/work -v gcsfuse-go-mod-cache:/go/pkg/mod -v gcsfuse-go-build-cache:/root/.cache/go-build -w /work golang:1.26.3 go test ./cfg ./internal/fs/inode ./internal/fs/handlegit diff --checkUpdates #4696