I got the following exception: java.lang.IllegalStateException: We a tier without interruption, but according to tier counters there should be 1 more entries. Size diverged? net.openhft.chronicle.map.impl.CompiledMapIterationContext.forEachTierEntryWhile(CompiledMapIterationContext.java:3779) net.openhft.chronicle.map.impl.CompiledMapIterationContext.innerForEachSegmentEntryWhile(CompiledMapIterationContext.java:3791) net.openhft.chronicle.map.impl.CompiledMapIterationContext.forEachSegmentEntryWhile(CompiledMapIterationContext.java:3811) net.openhft.chronicle.map.impl.CompiledMapIterationContext.forEachSegmentEntry(CompiledMapIterationContext.java:3816) net.openhft.chronicle.map.ChronicleMapIterator.fillEntryBuffer(ChronicleMapIterator.java:61) net.openhft.chronicle.map.ChronicleMapIterator.hasNext(ChronicleMapIterator.java:77)
Asked
Active
Viewed 254 times
1 Answers
1
Error message speaks for itself - Chronicle Map's memory is corrupt, recover it using ChronicleMapBuilder.recoverPersistedTo()
and try to iterate again.
It would be really helpful for preventing things like this in future, if you explain what do you mean under "restart". JVM process restart, or the server restart? What signal or command did you use to restart in either way?
Also FYI Chronicle Map.forEach()
or forEachEntry()
are much more efficient ways to iterate over a Chronicle Map than entrySet/keySey/values().iterator().

leventov
- 14,760
- 11
- 69
- 98
-
It is a JVM process restart. I hava tried forEach() or forEachEntry(), but I got an excepiton:70738 [SCHEDULER#3] ERROR net.openhft.chronicle.map.impl.CompiledMapIterationContext - Contexts locked on this segment: net.openhft.chronicle.map.impl.CompiledMapIterationContext@1c1f0e2: used, segment 6, local state: UNLOCKED, read lock count: 0, update lock count: 0, write lock count: 0 Current thread contexts: net.openhft.chronicle.map.impl.CompiledMapIterationContext@1c1f0e2: used, segment 6, local state: UNLOCKED, read lock count: 0, update lock count: 0, write lock count: 0 – Hui Li Sep 21 '16 at 09:54
-
Thanks. Kill -9 or cooperative? – leventov Sep 21 '16 at 09:56