confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
7.36k stars 3.11k forks source link

Fix data race when a buffer queue is being reset instead of being initialized #4718

Open emasab opened 1 month ago

emasab commented 1 month ago

A data race happened when emptying buffers of a failing broker, in its thread, with the statistics callback in main thread gathering the buffer counts. Solved by resetting the atomic counters instead of initializing them. Happening since 1.x

Closes #4522