bug(layers/throttle): throttle streaming ReadStream bytes instead of pre-charging ReadOptions::limit upper bounds on open()
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- backend, performance
調査の方向性
Start with core/layers/throttle/src/lib.rs and trace how ThrottleWrapper::open charges bytes and how oio::ReadStream::read handles streaming reads. Read core/core/src/raw/oio/read/api.rs for the exact range read behavior, then check the CacheLayer pointer lookup path. Done means the acceptance criteria pass, including regression coverage for unbounded reads, limits above burst, large buffers, and cancellation.
索引モデルが issue の本文から書いたものです。
説明
Background
Re-evaluating #7453 in light of newly added ReadOptions::limit and CacheLayer:
- In
core/layers/throttle/src/lib.rs:137-154,266-296,ThrottleWrapper::openpre-chargesrange.size()upfront before streaming any bytes, whileoio::ReadStream::readperforms no bandwidth charging. - While
#7453had a valid production reason to rate-limit concurrent exact range reads (oio::Read::read,core/core/src/raw/oio/read/api.rs:38) before dispatching requests to prevent request/FD spikes, streamingopen(range)allows short EOF and now carries defensive upper bounds viaReadOptions::limit:- Unbounded reads (
op.read("10gb"),range = 0..) bypassThrottleLayercompletely (range.size() == None). - Defensive bounded reads (
op.read_with("10_bytes").limit(10_MiB)) pre-charge the full 10 MiB upper bound and fail permanently withRateLimited(InsufficientCapacity) wheneverlimit > burstorlimit > u32::MAX. CacheLayer's pointer lookup (65,664bytes limit) fails on a throttled cache withburst = 32 KiB, degrading cache pointer lookups to misses.
- Unbounded reads (
Proposed Solution
- Preserve pre-admission rate limiting where exact-length range reads require it, and define a clear policy for requests larger than
burst(e.g., chunked waiting instead of immediateInsufficientCapacitywhere appropriate). - For streaming
oio::Read::open/oio::ReadStream::read, do not charge the fullReadOptions::limitupper bound upfront; throttle actual bytes transferred throughReadStream::read(handling unbounded0..reads, single buffers> burst, and cancellation cleanly, while clearly distinguishing body delivery vs network admission).
Acceptance Criteria
- Streaming
open(0..)reads are throttled byThrottleLayerrather than bypassing it. - Streaming reads with
ReadOptions::limit > burston small files succeed and are throttled according to actual bytes read (includingCacheLayerpointer lookups over a 32 KiB-burst throttled cache). - Add regression tests covering unbounded
0..reads,limit > burst, single buffer> burst, and cancellation.
This issue was reopened and independently verified by both audit leaders (gemini-4-neon and gpt-6.2-astra) ahead of Apache OpenDAL v0.60.0.
- 主要言語
- Rust
- スター
- 5.5k
- フォーク
- 869
- 平均マージ
- 8時間 2分
- マージ済み PR(30日)
- 862
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/opendal のほかの issue
-
bug(services/fs): deleting "/" removes the configured root directory対応中かも @xgbtxy が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
apache/opendal#9635 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
core enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/opendal#9572 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(bindings/nodejs): reject negative and overflowing BigInt values in WriteOptions.chunk and Read/ReaderOptions.gap対応中かも @rohan4naik が今日担当しました。 オープンbindings/nodejs bug
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
apache/opendal#9569 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bindings/c bindings/dotnet bindings/go bindings/java bindings/python bindings/ruby core integrations/object_store release release-blocker services/azblob services/azdls services/dropbox services/gcs_grpc services/git services/hf3fs services/redis services/remotestorage services/s3 website
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
apache/opendal#9560 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug services/dropbox services/gcs_grpc services/git services/hf3fs services/remotestorage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
apache/opendal#9553 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
メンテナーはふだん 1 日以内に返信
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Apich-Organization/rssn#295 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
thisnick/agent-wechat#908 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
FortoGraphy/prism-download-manager#242 ·
メンテナーはふだん 1 日以内に返信