KAFKA-10531: Check for negative values to Thread.sleep call (#9347)
System.currentTimeMillis() is not monotonic, so using that to calculate time to sleep can result in negative values. That will throw IllegalArgumentException. This change checks for that and sleeps for a second (to avoid tight loop) if the value returned is negative. Author: Shaik Zakir Hussain <zhussain@confluent.io> Reviewer: Randall Hauch <rhauch@gmail.com>
想要评论请 注册 或 登录