h2 lock write by table and not per line so TestSetSystemProperties that use 2 threads to update the system properties run into concurrent exception:
2018-10-25 10:19:02,706 [setSystemPropertiesPool-00] ERROR [ComputationRunner] setSystemProperties: Exception in processLoop: Failed to save session, org.h2.jdbc.JdbcBatchUpdateException: Timeout trying to lock table ; SQL statement: UPDATE "HIERARCHY" SET "ISTRASHED" = ?, "SYSTEMCHANGETOKEN" = "SYSTEMCHANGETOKEN" + ? WHERE "ID" = ? [50200-177] org.nuxeo.ecm.core.api.ConcurrentUpdateException: Failed to save session, org.h2.jdbc.JdbcBatchUpdateException: Timeout trying to lock table ; SQL statement: UPDATE "HIERARCHY" SET "ISTRASHED" = ?, "SYSTEMCHANGETOKEN" = "SYSTEMCHANGETOKEN" + ? WHERE "ID" = ? [50200-177] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:184) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.updateSimpleRows(JDBCRowMapper.java:649) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeUpdates(JDBCRowMapper.java:478) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:440) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:111) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.lambda$doConnectAndInvoke$0(JDBCMapperConnector.java:98) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:589) ~[nuxeo-runtime-jtajca-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doConnectAndInvoke(JDBCMapperConnector.java:95) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:84) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at com.sun.proxy.$Proxy166.write(Unknown Source) ~[?:?] at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:360) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.SessionImpl.doFlush(SessionImpl.java:358) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:330) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.SessionImpl.save(SessionImpl.java:309) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.save(ConnectionImpl.java:174) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.save(SQLSession.java:140) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.save(AbstractSession.java:1486) ~[nuxeo-core-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.bulk.action.SetSystemPropertiesAction$SetSystemPropertyComputation.compute(SetSystemPropertiesAction.java:94) ~[nuxeo-core-bulk-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.lambda$processBatchOfDocuments$0(AbstractBulkComputation.java:132) ~[nuxeo-core-bulk-10.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.transaction.TransactionHelper.lambda$runInTransaction$3(TransactionHelper.java:569) ~[nuxeo-runtime-jtajca-10.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:589) ~[nuxeo-runtime-jtajca-10.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:569) ~[nuxeo-runtime-jtajca-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.processBatchOfDocuments(AbstractBulkComputation.java:127) ~[nuxeo-core-bulk-10.3-SNAPSHOT.jar:?] at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.processRecord(AbstractBulkComputation.java:85) ~[nuxeo-core-bulk-10.3-SNAPSHOT.jar:?] at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:285) ~[nuxeo-stream-10.3-SNAPSHOT.jar:?] at org.nuxeo.lib.stream.computation.log.ComputationRunner.processLoop(ComputationRunner.java:194) ~[nuxeo-stream-10.3-SNAPSHOT.jar:?] at org.nuxeo.lib.stream.computation.log.ComputationRunner.run(ComputationRunner.java:152) [nuxeo-stream-10.3-SNAPSHOT.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181] Caused by: org.h2.jdbc.JdbcBatchUpdateException: Timeout trying to lock table ; SQL statement: UPDATE "HIERARCHY" SET "ISTRASHED" = ?, "SYSTEMCHANGETOKEN" = "SYSTEMCHANGETOKEN" + ? WHERE "ID" = ? [50200-177] at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1199) ~[h2-1.4.177-NX01.jar:1.4.177] at org.tranql.connector.jdbc.StatementHandle.executeBatch(StatementHandle.java:155) ~[tranql-connector-1.8.jar:1.8] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.updateSimpleRows(JDBCRowMapper.java:623) ~[nuxeo-core-storage-sql-10.3-SNAPSHOT.jar:?] ... 33 more
seen here:
- depends on
-
NXP-25963 Action should define a retry and fail policy
- Resolved