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

Fix random failure on testVersionBasedLocking / testDeleteObjectOrCancelCheckOut

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2
    • Component/s: CMIS

      Description

      These fail randomly:

      • TestNuxeoSessionLocal.testDeleteObjectOrCancelCheckOut
      • TestNuxeoSessionBrowser.testDeleteObjectOrCancelCheckOut
      • TestNuxeoSessionBrowser.testVersionBasedLocking

      Due to a missing foreign key during copy of fulltext in a cancelCheckOut:

      org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: org.nuxeo.ecm.core.api.ClientException: Failed to restore document SQLDocumentLive(testfile1,d3827543-02b7-478b-94cd-fbd9b2e9dcea)
      	at org.nuxeo.ecm.core.opencmis.impl.server.NuxeoCmisService.cancelCheckOut(NuxeoCmisService.java:2223)
      	at org.nuxeo.ecm.core.opencmis.impl.server.NuxeoCmisService.cancelCheckOut(NuxeoCmisService.java:2200)
      	at org.apache.chemistry.opencmis.server.support.wrapper.ConformanceCmisServiceWrapper.cancelCheckOut(ConformanceCmisServiceWrapper.java:1029)
      	at org.nuxeo.ecm.core.opencmis.impl.client.NuxeoDocument.cancelCheckOut(NuxeoDocument.java:48)
      	at org.nuxeo.ecm.core.opencmis.impl.NuxeoSessionTestCase.testDeleteObjectOrCancelCheckOut(NuxeoSessionTestCase.java:889)
      Caused by: org.nuxeo.ecm.core.api.ClientException: Failed to restore document SQLDocumentLive(testfile1,d3827543-02b7-478b-94cd-fbd9b2e9dcea)
      	at org.nuxeo.ecm.core.api.AbstractSession.restoreToVersion(AbstractSession.java:1978)
      	at org.nuxeo.ecm.core.api.AbstractSession.restoreToVersion(AbstractSession.java:1906)
      	at org.nuxeo.ecm.core.opencmis.impl.server.NuxeoCmisService.cancelCheckOut(NuxeoCmisService.java:2218)
      	... 51 more
      Caused by: org.nuxeo.ecm.core.api.DocumentException: org.nuxeo.ecm.core.storage.StorageException: Could not copy: 605bfd25-831b-45ae-90e8-48afcf78475d
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.restore(SQLSession.java:875)
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.restore(SQLDocumentLive.java:430)
      	at org.nuxeo.ecm.core.api.AbstractSession.restoreToVersion(AbstractSession.java:1958)
      	... 53 more
      Caused by: org.nuxeo.ecm.core.storage.StorageException: Could not copy: 605bfd25-831b-45ae-90e8-48afcf78475d
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.copy(JDBCRowMapper.java:1119)
      	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.copy(SoftRefCachingRowMapper.java:490)
      	at org.nuxeo.ecm.core.storage.sql.PersistenceContext.restoreVersion(PersistenceContext.java:1584)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.restore(SessionImpl.java:1260)
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.restore(SQLSession.java:873)
      	... 55 more
      Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_7E ON PUBLIC.FULLTEXT(ID) VALUES ( /* key:10 */ 'd3827543-02b7-478b-94cd-fbd9b2e9dcea', NULL, 'testfile1 description testfile txt foo gee moo john testfile1 title icons text png michael foo bar text plain', 'noodles with rice', 'testfile1 title', NULL)"; SQL statement:
      INSERT INTO "FULLTEXT" ("ID", "JOBID", "SIMPLETEXT", "BINARYTEXT", "SIMPLETEXT_TITLE", "BINARYTEXT_TITLE") SELECT ?, "JOBID", "SIMPLETEXT", "BINARYTEXT", "SIMPLETEXT_TITLE", "BINARYTEXT_TITLE" FROM "FULLTEXT" WHERE "ID" = ? [23505-177]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
      	at org.h2.message.DbException.get(DbException.java:178)
      	at org.h2.message.DbException.get(DbException.java:154)
      	at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103)
      	at org.h2.index.TreeIndex.add(TreeIndex.java:69)
      	at org.h2.index.MultiVersionIndex.add(MultiVersionIndex.java:59)
      	at org.h2.table.RegularTable.addRow(RegularTable.java:120)
      	at org.h2.command.dml.Insert.addRow(Insert.java:199)
      	at org.h2.command.dml.Insert.insertRows(Insert.java:173)
      	at org.h2.command.dml.Insert.update(Insert.java:115)
      	at org.h2.command.CommandContainer.update(CommandContainer.java:79)
      	at org.h2.command.Command.executeUpdate(Command.java:254)
      	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:158)
      	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:144)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.copyRows(JDBCRowMapper.java:1365)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.copy(JDBCRowMapper.java:1101)
      	... 59 more
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: