Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-14323

Improve concurrent update detection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.8.0-HF12, 5.9.4
    • Component/s: Core VCS

      Description

      Some concurrent updates are not yet detected at the SQL level:

      Caused by: org.nuxeo.ecm.core.storage.StorageException: Could not insert: INSERT INTO "content" ("id", "name", "length", "data", "encoding", "digest", "mime-type") VALUES (?, ?, ?, ?, ?, ?, ?)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:606)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:502)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:472)
      	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:427)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:392)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.flushAndScheduleWork(SessionImpl.java:366)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.end(SessionImpl.java:1457)
      	... 17 more
      Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO "content" ("id", "name", "length", "data", "encoding", "digest", "mime-type") VALUES ('8499121f-7b68-4558-bd7e-cfb0fa485729', 'b21b52769a8839d31a50ee58349f6df8', 423, 'b21b52769a8839d31a50ee58349f6df8', NULL, NULL, 'application/octet-stream') was aborted.  Call getNextException to see the cause.
      	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893)
      	at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
      	at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:590)
      	... 23 more
      Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "content_pk"
        Detail: Key (id)=(8499121f-7b68-4558-bd7e-cfb0fa485729) already exists.
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
      	... 28 more
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: