ijuma commented on a change in pull request #8517: URL: https://github.com/apache/kafka/pull/8517#discussion_r411779855
########## File path: core/src/main/scala/kafka/utils/DelayedItem.scala ########## @@ -33,7 +33,11 @@ class DelayedItem(val delayMs: Long) extends Delayed with Logging { * The remaining delay time */ def getDelay(unit: TimeUnit): Long = { - unit.convert(max(dueMs - Time.SYSTEM.milliseconds, 0), TimeUnit.MILLISECONDS) + unit.convert(getDelayMs, TimeUnit.MILLISECONDS) Review comment: It seems like it's only used in a test. So I suggest we remove it (as well as the Delayed implementation). ---------------------------------------------------------------- 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