Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2353

Concurrently creating child nodes for the same parent results in node loss when using Wildfly

XMLWordPrintable

    • Hide

      1. Clone the modified modeshape-cdi quick start from the linked GitHub repo

      2. Copy the standalone-modeshape-concurrent.xml included in the modified quick start to JBOSS_HOME/standalone/configuration

      3. Start Wildfly 8.1 via JBOSS_HOME/bin/standalone.sh -c standalone-modeshape-concurrent.xml

      4. Build and deploy the modified quick start via 'mvn clean package wildfly:deploy'

      5. Navigate to http://localhost:8080/modeshape-cdi

      6. Enter a node name and select Add Node

      7. Verify in the logs that 10 nodes where added.

      8. Select Show Children in the web application and verify only 2-3 nodes are displayed.

      Show
      1. Clone the modified modeshape-cdi quick start from the linked GitHub repo 2. Copy the standalone-modeshape-concurrent.xml included in the modified quick start to JBOSS_HOME/standalone/configuration 3. Start Wildfly 8.1 via JBOSS_HOME/bin/standalone.sh -c standalone-modeshape-concurrent.xml 4. Build and deploy the modified quick start via 'mvn clean package wildfly:deploy' 5. Navigate to http://localhost:8080/modeshape-cdi 6. Enter a node name and select Add Node 7. Verify in the logs that 10 nodes where added. 8. Select Show Children in the web application and verify only 2-3 nodes are displayed.

      As discussed in the forums https://developer.jboss.org/thread/249779 I am seeing issues when concurrently creating multiple child nodes for the same parent node.

      I have been unable to recreate this using the existing modeshape concurrency unit tests but have been able to re-create this with a slightly modified version of quick start/modeshape-cdi which I will make available on GitHub shortly.

      Currently this issue has been observed under the following conditions:

      1. Using the ModeShape subsystem in Wildfly 8.1 (I have tried both 4.0 and the latest 4.1 Snapshot from MASTER).
      2. When multiple threads attempt to create child nodes at the same time for the same parent node.
      3. An EJB is used to create the node (I have tried with both the REQUIRED and NEVER Transactional attributes on the EJB method).
      4. Using both a local and replicated Infinispan cache (Transaction mode = NON_XA and locking = PESSIMISTIC).
      5. When using both a File and JDBC store

      The modified quick start uses the ManagedExecutorService to create 10 child nodes concurrently when a node is added via Web UI instead of just creating a single node.

      I had to make a couple of changes to the standalone-modeshape.xml shipped with subsystem to enable the managed executor service and turn on PESSIMISTIC locking.

              hchiorean Horia Chiorean (Inactive)
              ma6rl_jira Richard Lucas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: