kkewwei commented on a change in pull request #741:
URL: https://github.com/apache/lucene/pull/741#discussion_r824358504



##########
File path: lucene/core/src/java/org/apache/lucene/index/MergeRateLimiter.java
##########
@@ -124,16 +125,21 @@ private long maybePause(long bytes, long curNS) throws 
MergePolicy.MergeAbortedE
     // Time we should sleep until; this is purely instantaneous
     // rate (just adds seconds onto the last time we had paused to);
     // maybe we should also offer decayed recent history one?
-    long targetNS = lastNS + (long) (1000000000 * secondsToPause);
-
+    long targetNS = lastedTime + (long) (1000000000 * secondsToPause);
     long curPauseNS = targetNS - curNS;

Review comment:
       `curPauseNS` will be not negative at first in the new code, but as  
called `maybePause` in a loop, `curPauseNS`  will be little than `MIN_PAUSE_NS` 
at last, `curPauseNS` is negative in a few case.




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to