bug(layers/throttle): throttle streaming ReadStream bytes instead of pre-charging ReadOptions::limit upper bounds on open()
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- rust
- Área
- backend, performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 5.5k
- Forks
- 869
- Merge medio
- 8 h 2 min
- PR fusionados (30 d)
- 862
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/opendal
-
bug(services/fs): deleting "/" removes the configured root directoryPosiblemente ocupada @xgbtxy la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 81/100
apache/opendal#9635 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
core enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
apache/opendal#9572 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
fix(bindings/nodejs): reject negative and overflowing BigInt values in WriteOptions.chunk and Read/ReaderOptions.gapPosiblemente ocupada @rohan4naik la tomó hoy. Abiertobindings/nodejs bug
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
apache/opendal#9569 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
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
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
apache/opendal#9560 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug services/dropbox services/gcs_grpc services/git services/hf3fs services/remotestorage
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
apache/opendal#9553 · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/opendal
Issues similares
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Apich-Organization/rssn#295 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
thisnick/agent-wechat#908 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Show install details by defaultAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
FortoGraphy/prism-download-manager#242 ·
Los mantenedores suelen responder en 1 día