storage: `Recommended` read-resume policy does not resume on `ABORTED`, the status the service uses to close an idle `BidiReadObject` stream

Aperta Adatta ai principianti
#7,344 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
grpc, rust
Ambito
cloud

Direzione di ricerca

Inizia da src/storage/src/read_resume_policy.rs, in is_transient_code (intorno alla riga 154), e verifica come Recommended associa il proprio risultato a ResumeResult. La issue chiede o di aggiungere Code::Aborted alla lista dei codici transitori, oppure di confrontare specificamente lo stato di chiusura per inattività. Prima di modificare, conferma quale soluzione vogliono i maintainer. Il lavoro è completo quando esiste un test in cui uno stato Aborted con Recommended restituisce un risultato riprendibile e i test esistenti della policy continuano a passare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

api: storage

What happens

read_resume_policy::is_transient_code (src/storage/src/read_resume_policy.rs line 154 on
main and in 1.21.0) treats Unavailable, ResourceExhausted, Internal and
DeadlineExceeded as resumable. Aborted is not in the list, so Recommended returns
ResumeResult::Permanent for it and the bidi worker stops.

Why it matters

Cloud Storage engineering told us, through our support case, that an idle BidiReadObject
stream is pruned after roughly six minutes and that the intended signal is gRPC ABORTED with a
message like "Idle stream closed...". What the client receives today is an HTTP/2
RST_STREAM(INTERNAL_ERROR) with no trailers, which surfaces as a transport error and is
resumed. The day the service sends the documented status, every client on the default policy
stops resuming idle-pruned streams: the worker parks in its permanent-error arm and every later
read on that descriptor fails (with #6688 unfixed, by a panic on the next read_range).

An idle-prune ABORTED on a descriptor with a valid read_handle is resumable by construction:
the resume is the same RPC carrying the handle, and the object has not changed.

Reproduction

Fake google.storage.v2.Storage (tonic) implementing BidiReadObject. Open a descriptor, read
one range, leave it idle, have the fake end the stream with Status::aborted("Idle stream closed"). Observed on 1.21.0: zero reconnect attempts reach the fake; the descriptor is dead.
With the fake ending the same idle stream with Unavailable instead, the client reconnects and
the next read succeeds.

Expected

Add Code::Aborted to is_transient_code, or match the idle-close status specifically if its
message or error details are stable. Either way Recommended should resume it.

Workaround

open_object(...).with_read_resume_policy(...) with a policy that continues on Aborted. We
recover at the pool level instead (evict the descriptor on a failed read and retry once on a
fresh stream), so the cost today is one failed read.

Environment

google-cloud-storage 1.21.0, gRPC transport, BidiReadObject via open_object; main has the
same code as of 2 Nov 2026.

Lingua principale
Rust
Stelle
972
Fork
163
Merge medio
1g 13h
PR unite (30g)
202

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di googleapis/google-cloud-rust

Tutte le issue di googleapis/google-cloud-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.