Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Range + If-Range support, end-to-end

Aperta
#332 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
go

Direzione di ricerca

Inizia da internal/strategy/apiv1.go e internal/cache/api.go, quindi esamina s3_parallel_get.go e i backend disk, memory, tiered e remote per comprendere i percorsi di lettura esistenti. Traccia l’infrastruttura client/ e remote per la gestione di Range e If-Range. Il lavoro è completo quando ogni backend restituisce i byte corretti dell’intervallo richiesto con 206 e Content-Range, un If-Range obsoleto restituisce 200 e gli intervalli non soddisfacibili restituiscono 416.

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

Descrizione

etag-range-followup

Follow-up from the ETag support assessment (label: etag-range-followup).

The strong content-hash ETag is already a suitable, tier-stable If-Range validator (a range continuation served from a different tier/pod validates correctly; a changed object correctly forces a full 200). The validator value is fine; the surrounding machinery is entirely missing.

Current gaps
  • apiv1.getObject (internal/strategy/apiv1.go) does io.Copy(w, cr) — always 200, never honours Range, never sets Accept-Ranges, never returns 206/Content-Range/416.
  • The cache.Cache interface (internal/cache/api.go) only exposes a whole-object Open returning an io.ReadCloser; there is no partial-read / seek capability. Only the disk backend reader happens to be seekable.
  • checkConditionals does not evaluate If-Range.
Work
  • Add a partial-read capability to the cache interface — either a range-aware open (offset + length) or a documented seekable-reader contract — and implement it for disk, memory, s3 (S3 already does parallel range GETs internally, see s3_parallel_get.go), tiered, and remote.
  • Implement server-side range handling in apiv1.getObject: parse Range, emit Accept-Ranges: bytes, return 206 with Content-Range for satisfiable ranges and 416 for unsatisfiable ones.
  • Evaluate If-Range (against the strong ETag; fall back to full 200 when the validator does not match) before serving a partial response.
  • Plumb Range/If-Range through the client (client/) and remote backend as needed so a tiered remote tier can serve ranges.
Acceptance

Ranged GET against each backend returns the correct bytes with 206/Content-Range; If-Range with a stale ETag returns the full object with 200; unsatisfiable ranges return 416.

Lingua principale
Go
Stelle
41
Fork
14
Merge medio
19h 28m
PR unite (30g)
3

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 block/cachew

Tutte le issue di block/cachew

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.