X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2Flru%2FLRU.java;fp=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2Flru%2FLRU.java;h=205b79906d2d9acdf8da600669bbe2fa51d200fb;hb=1cac6a3814ed4b828e2c182c129d2941dc3e2742;hp=b9ba72121858540c66e7c40d66990f196ecc7cea;hpb=cf88ed04d52564b6211ed09e584a35b526ea8342;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java index b9ba72121..205b79906 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java @@ -293,8 +293,19 @@ public class LRU> { if(valueToSwap.tryAcquireMutex()) { try { if(valueToSwap.canBePersisted()) { - valueToSwap.persist(); - return true; + boolean persist = valueToSwap.persist(); + if (!persist) { + LOGGER.error("\n Somehow valueToSwap {} could not be persisted even though canBePersisted returned true\n", valueToSwap); + LOGGER.error("priorityQueue.size() {}", priorityQueue.size()); + if (priorityQueue.size() > 0) { + LOGGER.error("priorityQueue first entry {}", priorityQueue.entrySet().iterator().next()); + } + LOGGER.error("map.size() {}", map.size()); + if (map.size() > 0) { + LOGGER.error("map first entry {}", map.entrySet().iterator().next()); + } + } + return persist; } } catch (Throwable t) { throw new IllegalAcornStateException(t);