benwtrent commented on code in PR #13190: URL: https://github.com/apache/lucene/pull/13190#discussion_r1530907881
########## lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java: ########## @@ -28,30 +30,30 @@ public final class RateLimitedIndexOutput extends FilterIndexOutput { private final RateLimiter rateLimiter; /** How many bytes we've written since we last called rateLimiter.pause. */ - private long bytesSinceLastPause; + private final AtomicLong bytesSinceLastPause = new AtomicLong(0); Review Comment: Ah, yeah, I could remove all the concurrency checks here. I was just concerned as the above assertions tripped because of the threads. but you are correct, they are still ultimately only written to via one thread. -- 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