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

ModeShape loses nodes during concurrency

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      Start server:

      1. Download modeshape-pp-test-YYYY-MM-DD.tar.gz (attached to this issue).
      2. Untar modeshape-pp-test-YYYY-MM-DD.tar.gz and cd in to modeshape-pp-test
      3. Create: /opt/modeshape/cache or change cache path in src/main/webapp/WEB-INF/classes/infinispan.xml
      4. Run:
        mvn clean install
      5. Run:
        mvn jetty:run

      Working test (one thread):

      1. From another terminal cd in to the modeshape-pp-test
      2. Run:
        ab -T "application/json" -c 1 -n 1000 -u src/main/resources/json http://localhost:8080/document/snabel
      3. Wait until ab is done
      4. Run:
        curl http://localhost:8080/document/snabel/count
      5. The reply should reply 11000

      Failing test (multi threded):

      1. Clean the cache by doing rm -rf or something.
      2. From another terminal cd in to the modeshape-pp-test
      3. Run:
        ab -T "application/json" -c 16 -n 1000 -r -u src/main/resources/json http://localhost:8080/document/snabel
      4. Wait until ab is done
      5. Run:
        curl http://localhost:8080/document/snabel/count
      6. The reply should reply with a number below 11000
      Show
      Start server: Download modeshape-pp-test-YYYY-MM-DD.tar.gz (attached to this issue). Untar modeshape-pp-test-YYYY-MM-DD.tar.gz and cd in to modeshape-pp-test Create: /opt/modeshape/cache or change cache path in src/main/webapp/WEB-INF/classes/infinispan.xml Run: mvn clean install Run: mvn jetty:run Working test (one thread): From another terminal cd in to the modeshape-pp-test Run: ab -T "application/json" -c 1 -n 1000 -u src/main/resources/json http: //localhost:8080/document/snabel Wait until ab is done Run: curl http: //localhost:8080/document/snabel/count The reply should reply 11000 Failing test (multi threded): Clean the cache by doing rm -rf or something. From another terminal cd in to the modeshape-pp-test Run: ab -T "application/json" -c 16 -n 1000 -r -u src/main/resources/json http: //localhost:8080/document/snabel Wait until ab is done Run: curl http: //localhost:8080/document/snabel/count The reply should reply with a number below 11000

      Description

      When operating concurrent clients that create lots of nodes, not all nodes are properly saved. There are no problems when using a single client.

      We have a created a test web app that receives json as data and saves that json as nodes and node properties. We have reproduced the problem both with infinspan configured with file cache and berkeley db cache. We have reproduced it both with infinispan configured to use OPTIMISTIC and PESSIMISTIC locking mode with a berkeley db cache.

      See the comments for the details.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rhauch Randall Hauch
                Reporter:
                codeape Oscar Norlander
              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: