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

lifecycle/stream: fetchMessages doesn't check done before calling fetch again

Open Beginner friendly
#2,976 0 comments 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
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Start in fetchMessages in pkg/lifecycle/stream/base.go and read how the loop selects on done when handing off results, then see where fetch(ctx) is called. Add a non-blocking check of done at the top of the loop, before fetch. Done means a test with a fetcher that returns empty batches shows the goroutine exits after cleanup.

Written by the indexing model from the issue text.

Description

Follow-up to #2969 / #2975 (pre-existing behaviour, not introduced by the fix).

fetchMessages in pkg/lifecycle/stream/base.go selects on done when handing a message or error over, but does not check done before calling fetch again. A source that keeps returning empty batches (no messages, no error) after the node has torn down never reaches a hand-over, so the goroutine spins calling Source.Read until ctx is cancelled.

Suggested fix: check done (non-blocking select) at the top of the loop, before fetch(ctx). Add a test with a fetcher that returns empty batches and assert the goroutine exits after cleanup.

Not data loss: no record is acked or dropped by this; it is a CPU/goroutine leak after the node stopped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SvPfP7eL7SskkoptXvAYCH

Dominant language
Go
Stars
611
Forks
63
Avg merge
1h 10m
Merged PRs (30d)
30

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 ConduitIO/conduit

All issues in ConduitIO/conduit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.