vigyasharma commented on a change in pull request #741:
URL: https://github.com/apache/lucene/pull/741#discussion_r824421924
##########
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:
I see you fixed the negative `currPauseNS` issue by changing targetNS to
`pauseStartingTime + (long) (1000000000 * secondsToPause) - lastedTime`..
thanks!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]