View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006814 | SymmetricDS Pro | Bug | public | 2025-04-10 13:17 | 2025-04-14 13:19 |
Reporter | pmarzullo | Assigned To | pmarzullo | ||
Priority | normal | ||||
Status | resolved | Resolution | fixed | ||
Product Version | 3.13.0 | ||||
Target Version | 3.16.2 | Fixed in Version | 3.16.2 | ||
Summary | 0006814: Initial load fails with DB concurrent error | ||||
Description | Initial 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 Reproduce | DB: Postgres 10.5 2 nodes. Fully default symmetric configuration. | ||||
Tags | dialect: postgresql, initial/partial load | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2025-04-10 13:17 | pmarzullo | New Issue | |
2025-04-10 13:17 | pmarzullo | Status | new => assigned |
2025-04-10 13:17 | pmarzullo | Assigned To | => pmarzullo |
2025-04-10 13:17 | pmarzullo | Tag Attached: dialect: postgresql | |
2025-04-10 13:17 | pmarzullo | Tag Attached: initial/partial load | |
2025-04-10 13:17 | pmarzullo | Relationship added | related to 0004643 |
2025-04-14 13:17 | pmarzullo | Status | assigned => resolved |
2025-04-14 13:17 | pmarzullo | Fixed in Version | => 3.16.2 |
2025-04-14 13:18 | pmarzullo | Resolution | open => fixed |
2025-04-14 13:18 | pmarzullo | Status | resolved => new |
2025-04-14 13:18 | pmarzullo | Resolution | fixed => reopened |
2025-04-14 13:19 | pmarzullo | Status | new => resolved |
2025-04-14 13:19 | pmarzullo | Resolution | reopened => fixed |