You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/04/21 02:26:46 UTC

[GitHub] [kafka] lbradstreet commented on a change in pull request #8517: MINOR: avoid unnecessary delay conversion in isDelayed check

lbradstreet commented on a change in pull request #8517:
URL: https://github.com/apache/kafka/pull/8517#discussion_r411821681



##########
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:
       Sure thing. I'll drop it.




----------------------------------------------------------------
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:
users@infra.apache.org