chitralverma commented on PR #8966: URL: https://github.com/apache/opendal/pull/8966#issuecomment-7128500195
Thanks for the review and for opening #9018. All three points are done in 048d273: 1. `list_with_recursive_flat` is gone, together with the binding, `capabilities.json`, `upgrade.md` and service changes. The diff now touches only `layers/glob.rs`, its tests and `raw/glob_matcher.rs`. 2. `GlobLayer` uses `capability.list_with_recursive`. 3. `take_next` walks the parents of each key once, starting after the last directory it checked. It stores only the directories that it returns, so it does no work for parents that do not match. One decision differs from the review: the recursive listing is used only when the remaining pattern is `*` components and then `**` (`t/**/*.parquet`, `t/*/**`). A pattern that spans directories but skips some of them keeps `GuidedLister`. A recursive listing reads every key below its prefix. When the walk prunes, that costs more requests than `main`: | pattern (48,000 keys under `logs/`, 1,000 keys per page) | `main` | one recursive listing | |---|---|---| | `logs/*/m=03/d=05/*.json` | 7 | 48 | | `logs/*/*/` | 3 | 48 | | `*/part=3/*` | 4 | 50 | With the rule above, no pattern needs more requests than on `main` in our runs (25 patterns on memory, 17 cases on real S3). `t/*/*.parquet` keeps its 201 requests. Changing that safely needs a mode that adapts to the observed fan-out, for example "walk, but switch to one recursive listing when a directory has more than N children". I can open an issue for that. This also keeps fs on the walk for pruned patterns before #9018 lands, so the two PRs can merge in either order. They conflict only in `raw/glob_matcher.rs`: #9018 makes `GlobPattern` public, and this PR adds `walks_whole_subtree`. I will rebase after #9018 merges. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
