The GitHub Actions job "Golang Coverage" on 
rocketmq-clients.git/fix/race-condition-receive-message has failed.
Run started by GitHub user guyinyou (triggered by guyinyou).

Head commit for run:
eb6d0d433f9e7df2d0154d080b3a55903dc1e439 / guyinyou 
<[email protected]>
[Go] Fix data race in receiveMessage for push and simple consumers

The err and resps variables were shared between the main goroutine
and a spawned goroutine without synchronization, causing a data race
detectable by Go's race detector. The goroutine wrote to both
variables while the select handler read them concurrently.

Move resps and err into the goroutine as local variables, and pass
results back through a typed channel (receiveResult struct) instead.
This also fixes push_consumer.go not signaling the done channel on
non-EOF errors, which previously caused it to wait for context
timeout instead of returning the actual error immediately.

Affected:
- golang/push_consumer.go: receiveMessage()
- golang/simple_consumer.go: receiveMessage()

Report URL: https://github.com/apache/rocketmq-clients/actions/runs/27400305741

With regards,
GitHub Actions via GitBox

Reply via email to