Details
Description
Yes, we do have a deadlock in CacheStore.loadAll, as demonstrated by this reproducer.
The obvious embarassing fix is to replace HashMap with TreeMap, which will of course not work if keys are not comparable
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 3156d6d662d..3947800a908 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -34,6 +34,7 @@ import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import java.util.Set; +import java.util.TreeMap; import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; @@ -2054,7 +2055,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V if (res.value() == null) { if (misses == null) - misses = new HashMap<>(); + misses = new TreeMap<>(); misses.put(key, res);
Attachments
Attachments
Issue Links
- relates to
-
IGNITE-12428 Cache configuration cacheLoader error after cfgs serialization changes
- Resolved
-
IGNITE-12365 Concurrent removeAll() on the same cache leads to deadlock
- Resolved
- links to