Uploaded image for project: 'Nuxeo Web UI'
  1. Nuxeo Web UI
  2. WEBUI-664

Fix document cleanup on Web UI ftests for 10.10

    Details

      Description

      When cleaning up documents created during the functional tests of Web UI, in some situations, but most commonly in the "Search" feature file, when the "I have the following groups" runs after a scenario that cleanup documents created by "I have the following documents":

      2022-01-28T18:19:12,122 ERROR [Nuxeo-Work-collections-15] [org.nuxeo.ecm.core.work.WorkManagerImpl] Uncaught error on thread: Nuxeo-Work-collections-15, current work might be lost, WorkManager metrics might be corrupted.
      org.nuxeo.ecm.core.api.NuxeoException: Work failed after 0 retries, class=class org.nuxeo.ecm.collections.core.worker.RemovedCollectionMemberWork id=default:d340cd96-a513-4ab5-89c1-5c8050c5e846:0 category=removedCollectionMember title=Remove CollectionMember Work
      	at org.nuxeo.ecm.core.work.AbstractWork.workFailed(AbstractWork.java:439) ~[nuxeo-core-event-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:395) ~[nuxeo-core-event-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) ~[nuxeo-core-event-10.10-HF56.jar:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_322]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_322]
      	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_322]
      Caused by: org.nuxeo.ecm.core.api.ConcurrentUpdateException: Concurrent update
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:186) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:551) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:462) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:439) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) ~[?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_322]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_322]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:111) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.lambda$doConnectAndInvoke$0(JDBCMapperConnector.java:98) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:636) ~[nuxeo-runtime-jtajca-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doConnectAndInvoke(JDBCMapperConnector.java:95) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:84) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at com.sun.proxy.$Proxy74.write(Unknown Source) ~[?:?]
      	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:360) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.doFlush(SessionImpl.java:375) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:347) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.end(SessionImpl.java:1370) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end(WrapperNamedXAResource.java:61) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:569) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:548) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:408) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:255) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.commit(NuxeoContainer.java:538) ~[nuxeo-runtime-jtajca-10.10-HF56.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:422) ~[nuxeo-runtime-jtajca-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:522) ~[nuxeo-core-event-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:383) ~[nuxeo-core-event-10.10-HF56.jar:?]
      	... 4 more
      Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "FULLTEXT_ID_HIERARCHY_FK: PUBLIC.FULLTEXT FOREIGN KEY(ID) REFERENCES PUBLIC.HIERARCHY(ID) ('a6bdfa37-4652-46d5-bc55-e1d922f0dc65')"; SQL statement:
      INSERT INTO "FULLTEXT" ("ID", "JOBID", "SIMPLETEXT", "BINARYTEXT", "SIMPLETEXT_TITLE", "BINARYTEXT_TITLE", "SIMPLETEXT_DESCRIPTION", "BINARYTEXT_DESCRIPTION") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [23506-177]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.message.DbException.get(DbException.java:178) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.message.DbException.get(DbException.java:154) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:373) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:315) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.table.Table.fireConstraints(Table.java:909) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.table.Table.fireAfterRow(Table.java:927) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.command.dml.Insert.insertRows(Insert.java:162) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.command.dml.Insert.update(Insert.java:115) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.command.CommandContainer.update(CommandContainer.java:79) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.command.Command.executeUpdate(Command.java:254) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:199) ~[h2-1.4.177-NX01.jar:1.4.177]
      	at org.tranql.connector.jdbc.PreparedStatementHandle.execute(PreparedStatementHandle.java:177) ~[tranql-connector-1.8.jar:1.8]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:539) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:462) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:439) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) ~[?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_322]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_322]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:111) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.lambda$doConnectAndInvoke$0(JDBCMapperConnector.java:98) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:636) ~[nuxeo-runtime-jtajca-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doConnectAndInvoke(JDBCMapperConnector.java:95) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:84) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at com.sun.proxy.$Proxy74.write(Unknown Source) ~[?:?]
      	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:360) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.doFlush(SessionImpl.java:375) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:347) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.end(SessionImpl.java:1370) ~[nuxeo-core-storage-sql-10.10-HF56.jar:?]
      	at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end(WrapperNamedXAResource.java:61) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:569) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:548) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:408) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:255) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.commit(NuxeoContainer.java:538) ~[nuxeo-runtime-jtajca-10.10-HF56.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:422) ~[nuxeo-runtime-jtajca-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:522) ~[nuxeo-core-event-10.10-HF56.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:383) ~[nuxeo-core-event-10.10-HF56.jar:?]
      	... 4 more
      

      This suggests that the order in which we are cleaning up documents, and perhaps the fact that we might doing cleanup requests in parallel, might somehow interfere with the consistency of the database. From this point on, most tests start to fail, with a rejection from the server whenever there's a call to the Rest API.

      Observed in all runs.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gbarata Gabriel Barata
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.