diff --git a/src/main/java/org/elasticsearch/index/fielddata/IndexFieldDataCache.java b/src/main/java/org/elasticsearch/index/fielddata/IndexFieldDataCache.java index c48652f854e..f7f00f9ddd5 100644 --- a/src/main/java/org/elasticsearch/index/fielddata/IndexFieldDataCache.java +++ b/src/main/java/org/elasticsearch/index/fielddata/IndexFieldDataCache.java @@ -151,7 +151,7 @@ public interface IndexFieldDataCache { static class Key { final Object readerKey; - final List listeners = new ArrayList<>(); // optional stats listener + final List listeners = new ArrayList<>(); long sizeInBytes = -1; // optional size in bytes (we keep it here in case the values are soft references) Key(Object readerKey) { diff --git a/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCache.java b/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCache.java index 36969833ab7..3c4456ad10e 100644 --- a/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCache.java +++ b/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCache.java @@ -197,7 +197,7 @@ public class IndicesFieldDataCache extends AbstractComponent implements RemovalL public final IndexFieldCache indexCache; public final Object readerKey; - public final List listeners = new ArrayList<>(); // optional stats listener + public final List listeners = new ArrayList<>(); long sizeInBytes = -1; // optional size in bytes (we keep it here in case the values are soft references)