You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/03/11 06:28:53 UTC

[GitHub] [lucene] vigyasharma commented on a change in pull request #741: LUCENE-10448: avoid the instant writing rate bigger than the limited rate in merge process

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: issues-unsubscribe@lucene.apache.org

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



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