diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemoryTranslog.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemoryTranslog.java index 81f9e003e22..6d6d7e17e73 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemoryTranslog.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/memory/MemoryTranslog.java @@ -60,7 +60,7 @@ public class MemoryTranslog extends AbstractIndexShardComponent implements Trans } @Override public int size() { - return operations.size(); + return operationCounter.get(); } @Override public ByteSizeValue estimateMemorySize() {