Set the DiskStats.invalidatedCount to zero
The tracking of the invalidation count was introduced in Ie82d95df8aa
for enabling the automatic rebuild of the BloomFilter is used in the H2
persistent cache.
Cache-Chroniclemap does not expand or shrink its cache and simply keeps
an index of the items that are valid or invalid without having to
rebuild it.
The additional invalidation count is therefore not useful in this
implementation, it can be safely set to zero.
Change-Id: Ic1b35d1307a8a470240c6f4d75114831015c4e1e
diff --git a/src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapCacheImpl.java b/src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapCacheImpl.java
index 3d6fc6d..47aa5f7 100644
--- a/src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapCacheImpl.java
+++ b/src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapCacheImpl.java
@@ -38,6 +38,7 @@
implements PersistentCache {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
+ private static final long DONT_TRACK_CACHE_INVALIDATIONS = 0L;
private final ChronicleMapCacheConfig config;
private final ChronicleMapStore<K, V> store;
@@ -353,7 +354,8 @@
store.longSize(),
config.getCacheFile().length(),
hitCount.longValue(),
- missCount.longValue());
+ missCount.longValue(),
+ DONT_TRACK_CACHE_INVALIDATIONS);
}
public CacheStats memStats() {