diff --git a/core/src/main/java/org/elasticsearch/indices/IndexingMemoryController.java b/core/src/main/java/org/elasticsearch/indices/IndexingMemoryController.java index 35bf4d3b62c..e4f5416ef53 100644 --- a/core/src/main/java/org/elasticsearch/indices/IndexingMemoryController.java +++ b/core/src/main/java/org/elasticsearch/indices/IndexingMemoryController.java @@ -256,6 +256,8 @@ public class IndexingMemoryController extends AbstractComponent implements Index } finally { runLock.unlock(); } + // Could be while we were checking, more bytes arrived: + totalBytes = bytesWrittenSinceCheck.addAndGet(bytes); } else { break; }