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: [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]