confluentinc / librdkafka

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

Fix to main loop timeout calculation leading to a tight loop for a max period of 1 ms #4671

Closed emasab closed 2 months ago

emasab commented 2 months ago

When the main thread loop was awakened less than 1 ms before the expiration of a timeout, it was serving with a zero timeout, leading to increased CPU usage until the timeout was reached. Happening since 1.x