Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Close the initial GCS range reader when closing rangedReader

Open Beginner friendly
#2,155 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
gcp, go
Domain
cloud

Research direction

Start in pkg/objectstorage/gcsranged.go, following GetObject into newRangedReader and rangedReader.Close. Check how the initial GCS range reader is passed as head and how the child context is cancelled. Done means closing a partially consumed rangedReader also closes head or otherwise stops its request, without changing later range-fetch behavior.

Written by the indexing model from the issue text.

Description

area/storage kind/bug

In pkg/objectstorage/gcsranged.go, GetObject opens the first GCS range reader with the caller's context and passes it as head to newRangedReader. newRangedReader creates a child context for later range fetches, but rangedReader.Close only cancels that child context and does not close head. Closing a partially consumed object reader therefore leaves the original head request/body owned by the caller's context instead of stopping it with the returned reader. Please close head on Close (or create it with the reader-owned context and still close it).

Dominant language
Go
Stars
4.4k
Forks
515
Avg merge
2d 13h
Merged PRs (30d)
279

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agent-substrate/substrate

All issues in agent-substrate/substrate

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.