new feature: switch glob to one recursive listing when the walk finds many directories

オープン
#9,034 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

Start with GlobLayer and the walk-versus-recursive-listing choice in src/daft-io/src/object_store_glob.rs, the file the payload names for the existing fanout_limit. Read #8966 to see how the current filter path works. Done means a directory-count limit that switches to one recursive listing, no duplicate entries after the switch, and limit, start_after, versions and delete markers unchanged.

索引モデルが issue の本文から書いたものです。

説明

core enhancement
Feature Description

GlobLayer filters one recursive listing when the walk would list every directory, and walks in all other cases (#8966). Add a third case: walk, and switch to one recursive listing of a directory when the walk finds many directories below it.

Problem and Solution

A recursive listing reads every key below its prefix. It costs fewer requests than the walk when the walk skips few directories, and more when the walk skips many. The pattern alone cannot tell these cases apart.

List requests on memory, counted as S3 pages of 1,000 keys, for a tree of 49,200 keys:

pattern walk (main) one recursive listing
t/*/_meta.json 201 2
*/*/m=03/*/*.json 227 50
logs/*/m=03/d=05/*.json 7 48
logs/*/*/ 3 48

On real S3, with 1,000 keys under t/part=0..199/, t/*/*.parquet takes 201 requests and 51 s with the walk, and 1 request and 0.37 s with one recursive listing.

Proposed solution: count the directories that each walked listing returns. Past a limit, replace the rest of the walk below that directory with one recursive listing of it, filtered by the pattern. Daft does this with fanout_limit (default 1024) in src/daft-io/src/object_store_glob.rs.

Points to decide:

  • The limit. The walk does not know the key count below a directory, so the limit can only use the directory count.
  • After the switch, entries that the walk already returned must not repeat.
  • limit, start_after, versions and delete markers keep their current behavior.
Additional Context

Follow-up to #8966. Services with native glob, such as fs (#9018), are not affected.

主要言語
Rust
スター
5.5k
フォーク
869
平均マージ
8時間 2分
マージ済み PR(30日)
862

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/opendal のほかの issue

apache/opendal の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。