rhauch commented on pull request #9347: URL: https://github.com/apache/kafka/pull/9347#issuecomment-702944802
> Considering that I decided to rewrite the loop to fix all three issues. That makes sense, and I noticed the same when reviewing. > Good question on performance. It seems like System.nanoTime() is slower than System.currentTimeMillis (one is read from h/w using i/o another one is reading from memory), but not sure if that has any implication here for this use case. We are waiting for topic to appear in metadata and sleeping for seconds. Few milliseconds difference should not matter. That's probably true. But if `Thread.sleep(negativeTime)` throws an `IllegalArgumentException`, should we also change `Utils.sleep(...)` (called by `SystemTime.sleep(...)` that is now used above) to check and return immediately for a negative number of milliseconds to sleep? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org