[ https://issues.apache.org/jira/browse/OAK-3937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15126408#comment-15126408 ]
Julian Reschke edited comment on OAK-3937 at 2/1/16 3:52 PM: ------------------------------------------------------------- I confirm that with Postgres, the updateCount returned in the BatchUpdateException can be positive, although the rows are not inserted. It also seems that the proposed patch makes {{concurrentBatchUpdate()}} perform better, but I still see occasional failures. EDIT: these failures appear to be causes by CHUNKSIZE being < 100 (the number of documents being inserted by the test). Using CHUNKSIZE == 128 makes the test pass, making it == 10 makes it fail more often. was (Author: reschke): I confirm that with Postgres, the updateCount returned in the BatchUpdateException can be positive, although the rows are not inserted. It also seems that the proposed patch makes {{concurrentBatchUpdate()}} perform better, but I still see occasional failures. > Batch createOrUpdate() may fail with primary key violation > ---------------------------------------------------------- > > Key: OAK-3937 > URL: https://issues.apache.org/jira/browse/OAK-3937 > Project: Jackrabbit Oak > Issue Type: Technical task > Components: core, rdbmk > Reporter: Marcel Reutegger > Assignee: Julian Reschke > Fix For: 1.4 > > Attachments: OAK-3937.patch, rdb-oddity.patch > > > In some cases the batch createOrUpdate() method may fail on RDBMK with a > primary key violation exception. > {noformat} > 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] > {noformat} > See the currently disabled test > {{MultiDocumentStoreTest.concurrentBatchUpdate()}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)