Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12425

Deadlock on CacheStore.loadAll

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.7.6
    • None
    • cache
    • Release Notes Required

    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            ilyak Ilya Kasnacheev

            Dates

              Created:
              Updated:

              Slack

                Issue deployment