Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2066 DocumentStore API: batch create, but no batch update
  3. OAK-3937

Batch createOrUpdate() may fail with primary key violation

    XMLWordPrintableJSON

Details

    • Technical task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.15, 1.4
    • core, rdbmk
    • None

    Description

      In some cases the batch createOrUpdate() method may fail on RDBMK with a primary key violation exception.

      java.lang.AssertionError: org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "PRIMARY_KEY_1 ON PUBLIC.DSTEST_NODES(ID) VALUES ('1:/node-40', 118)"; SQL statement:
      insert into dstest_NODES(ID, MODIFIED, HASBINARY, DELETEDONCE, MODCOUNT, CMODCOUNT, DSIZE, DATA, BDATA) values (?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-185]
      

      See the currently disabled test MultiDocumentStoreTest.concurrentBatchUpdate().

      Attachments

        1. OAK-3937.diff
          11 kB
          Julian Reschke
        2. OAK-3937.patch
          2 kB
          Tomek Rękawek
        3. rdb-oddity.patch
          7 kB
          Tomek Rękawek

        Issue Links

          Activity

            People

              reschke Julian Reschke
              mreutegg Marcel Reutegger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: