diff --git a/src/main/java/no/rutebanken/anshar/data/SiriRepository.java b/src/main/java/no/rutebanken/anshar/data/SiriRepository.java index 8d0d27285..bea32cc0a 100644 --- a/src/main/java/no/rutebanken/anshar/data/SiriRepository.java +++ b/src/main/java/no/rutebanken/anshar/data/SiriRepository.java @@ -100,6 +100,15 @@ protected void enableCache(IMap map) { protected void enableCache(IMap map, java.util.function.Predicate includeInCachePredicate) { + // Looping through all keys to sync metadata before startup + int sizeBefore = map.localKeySet().size(); + int counter = 0; + for (SiriObjectStorageKey key : map.keySet()) { + counter++; + } + int sizeAfter = map.localKeySet().size(); + logger.info("Instance started with {} keys (localKeySet.size: before {}, after {})", counter, sizeBefore, sizeAfter); + // Entry added - new data map.addEntryListener((EntryAddedListener) entryEvent -> {