vigyasharma commented on a change in pull request #738: URL: https://github.com/apache/lucene/pull/738#discussion_r824239962
########## File path: lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java ########## @@ -68,9 +68,14 @@ public void writeByte(byte b) throws IOException { @Override public void writeBytes(byte[] b, int offset, int length) throws IOException { - bytesSinceLastPause += length; - checkRate(); - delegate.writeBytes(b, offset, length); + while (length > 0) { + int chunk = (int) Math.min(currentMinPauseCheckBytes + 1, length); Review comment: I added an assert for this, along with some more tests. -- 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