IBM / sarama

Sarama is a Go library for Apache Kafka.
MIT License
11.21k stars 1.73k forks source link

Fix cpu spin loop when pending is closed while buf is not empty #2922

Open AleksandrShibanov opened 4 weeks ago

AleksandrShibanov commented 4 weeks ago

it can be situation when on line 854 pending is ok on line 860 we add res to buf on line 861 pending closes in other goroutine and then there will be cpu spin loop.

I will be glad to see your suggestions and comments

AleksandrShibanov commented 4 weeks ago

https://github.com/IBM/sarama/issues/2907