diff --git a/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java b/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java index 76fa7d6056a..d5d5709bca4 100644 --- a/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java +++ b/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java @@ -70,6 +70,10 @@ public final class RateLimitedIndexOutput extends IndexOutput { public void writeBytes(byte[] b, int offset, int length) throws IOException { bytesSinceLastPause += length; checkRate(); + // The bytes array slice is written without pauses. + // This can cause instant write rate to breach rate limit if there have + // been no writes for enough time to keep the average write rate within limit. + // See https://issues.apache.org/jira/browse/LUCENE-10448 delegate.writeBytes(b, offset, length); }