View Issue Details

IDProjectCategoryView StatusLast Update
0004643SymmetricDSBugpublic2020-11-25 09:13
Reporterpyotrk Assigned To 
Priorityhigh 
Status newResolutionopen 
Product Version3.12.5 
Summary0004643: Initial load fails with DB concurrent error
DescriptionInitial load fails with the next error:
2020-11-19 14:46:44,890 ERROR [Primary-EED0D853-1771-2C49-B8CF-B25FE290ED67] [InitialLoadService] [Primary-EED0D853-1771-2C49-B8CF-B25FE290ED67-job-16] Error while queuing initial loads StackTraceKey.init [SqlException:985884203] org.jumpmind.db.sql.SqlException: ERROR: could not serialize access due to concurrent update
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:306)
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:295)
        at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:398)
        at org.jumpmind.db.sql.JdbcSqlTransaction.prepareAndExecute(JdbcSqlTransaction.java:364)
        at org.jumpmind.symmetric.service.impl.DataService.insertReloadEvents(DataService.java:1046)
        at org.jumpmind.symmetric.service.impl.InitialLoadService.processTableRequestLoads(InitialLoadService.java:282)
        at org.jumpmind.symmetric.service.impl.InitialLoadService.queueLoads(InitialLoadService.java:98)
        at org.jumpmind.symmetric.job.InitialLoadJob.doJob(InitialLoadJob.java:43)
        at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:227)
        at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:298)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:319)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:191)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.lang.Thread.run(Thread.java:818)
Caused by: org.postgresql.util.PSQLException: ERROR: could not serialize access due to concurrent update
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
        at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:153)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
        at org.jumpmind.db.sql.JdbcSqlTransaction$6.execute(JdbcSqlTransaction.java:374)
        at org.jumpmind.db.sql.JdbcSqlTransaction$6.execute(JdbcSqlTransaction.java:364)
        at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:396)
        ... 15 more

The actual place where it fails is (DataService.java, 1046 line):
transaction.prepareAndExecute(getSql("updateTableReloadStatusFinalizeCount"), finalizeBatchCount, new Date(), loadId);

I checked the isolation level for Postgres JDBC transactions and it was TRANSACTION_READ_COMMITTED = 2. I also noticed that when setting the parameter: datareload.batch.insert.transactional from TRUE to FALSE initial load finishes.
Steps To ReproduceDB: Postgres 10.5
2 nodes.
Fully default symmetric configuration.
TagsNo tags attached.

Activities

pyotrk

2020-11-25 09:13

reporter   ~0001860

Any suggestion on this? Can it be the issue in configuration?

Issue History

Date Modified Username Field Change
2020-11-19 12:08 pyotrk New Issue
2020-11-25 09:13 pyotrk Note Added: 0001860