diff --git a/server/src/main/java/org/elasticsearch/indices/IndicesQueryCache.java b/server/src/main/java/org/elasticsearch/indices/IndicesQueryCache.java index 1dfbc3af42b49..814288dbe588f 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndicesQueryCache.java +++ b/server/src/main/java/org/elasticsearch/indices/IndicesQueryCache.java @@ -206,7 +206,7 @@ QueryCacheStats toQueryCacheStats() { } private static class StatsAndCount { - int count; + volatile int count; final Stats stats; StatsAndCount(Stats stats) {