sassoftware / sassoftware/arke
streamSubscribe panics on NewConsumer failure; unsynced stats counters
Open
Nobody has claimed this yet.
bug
go
- Dominant language
- Go
- Stars
- 6
- Forks
- 2
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 8
Description
Two bugs in the amqp091 stream path:
streamSubscribeignores the error fromStreamConnection.NewConsumerand then unconditionally callsconsumer.Close(). When the consumer fails to construct it returns(nil, err), and the subsequentClose()panics the goroutine. The error should be surfaced as*pb.Errorand the increment/Closepath skipped.Stats()andconnectionCleanerreadproduced,consumed, andActiveStreamsas plainint64s, but writers useatomic.AddInt64. The reads should useatomic.LoadInt64to remove the data race.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the streamSubscribe, Stats(), and connectionCleaner entry points. Trace the NewConsumer failure path and the atomic writes to produced, consumed, and ActiveStreams; done means the failure returns a *pb.Error without panicking and the counter reads are race-safe.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100