Uploaded image for project: 'eXo-JCR'
  1. eXo-JCR
  2. EXOJCR-325 JCR cache based on JBossCache
  3. EXOJCR-423

Check if cache data structure exists before creating it to prevent TimeoutException on startup

    Details

      Description

      When a node joins a cluster in heavy load we can get TimeoutExceptions due to the fact that the new node try to create the cache data structure that already exists.

      Everywhere in the code where we create the cache data structure, we should check first if the node already exists. Which means that instead of doing:
      cacheRoot.addChild(itemsRoot).setResident(true);
      we do:
      Node<Serializable, Object> itemsRootNode = cacheRoot.getChild(itemsRoot);
      if (itemsRootNode == null)
      {
      itemsRootNode = cacheRoot.addChild(itemsRoot);
      }
      itemsRootNode.setResident(true);

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                nzamosenchuk Nikolazy Zamosenchuk
                Reporter:
                nfilotto Nicolas Filotto
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h