View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003288 | SymmetricDS | Bug | public | 2017-10-20 18:58 | 2017-11-06 13:13 |
Reporter | mmichalek | Assigned To | mmichalek | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.8.0 | ||||
Target Version | 3.8.31 | Fixed in Version | 3.8.31 | ||
Summary | 0003288: The cancellation of pending heartbeat batches can cause a deadlock on SQL Server | ||||
Description | This change attempts to do a dirty read of the batch id's which need updated, and then update them one-by-one, in attempt to do less locking on the database. Below is the stacktrace that was observed with this problem: 2017-10-17 06:59:31,222 ERROR [nodeId] [HeartbeatJob] [nodeId-job-15] StackTraceKey.init [SqlException:3213895714] org.jumpmind.db.sql.SqlException: Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:300) at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:291) at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:493) at org.jumpmind.db.sql.JdbcSqlTemplate.update(JdbcSqlTemplate.java:342) at org.jumpmind.db.sql.AbstractSqlTemplate.update(AbstractSqlTemplate.java:224) at org.jumpmind.symmetric.service.impl.OutgoingBatchService.markAllChannelAsSent(OutgoingBatchService.java:160) at org.jumpmind.symmetric.job.PushHeartbeatListener.heartbeat(PushHeartbeatListener.java:92) at org.jumpmind.symmetric.service.impl.DataService.heartbeat(DataService.java:1995) at org.jumpmind.symmetric.job.HeartbeatJob.doJob(HeartbeatJob.java:56) at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:175) at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:219) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.runAndReset(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.sql.SQLException: Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2894) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2334) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:643) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:614) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:573) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:761) 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.JdbcSqlTemplate$5.execute(JdbcSqlTemplate.java:374) at org.jumpmind.db.sql.JdbcSqlTemplate$5.execute(JdbcSqlTemplate.java:342) at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:491) ... 16 more | ||||
Tags | No tags attached. | ||||
SymmetricDS: 3.8 e06317dc 2017-10-20 14:59:03 Details Diff |
0003288: The cancellation of pending heartbeat batches can cause a deadlock on SQL Server |
Affected Issues 0003288 |
|
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java | Diff File | ||
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceSqlMap.java | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-20 18:58 | mmichalek | New Issue | |
2017-10-20 18:58 | mmichalek | Status | new => assigned |
2017-10-20 18:58 | mmichalek | Assigned To | => mmichalek |
2017-10-20 19:00 | mmichalek | Changeset attached | => SymmetricDS 3.8 e06317dc |
2017-10-20 19:01 | mmichalek | Status | assigned => resolved |
2017-10-20 19:01 | mmichalek | Resolution | open => fixed |
2017-10-20 19:01 | mmichalek | Fixed in Version | => 3.8.31 |
2017-11-06 13:13 | chenson | Status | resolved => closed |