View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003265 | SymmetricDS Pro | Bug | public | 2017-10-02 20:44 | 2017-10-06 11:53 |
Reporter | mmichalek | Assigned To | mmichalek | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.8.30 | ||||
Target Version | 3.8.30 | Fixed in Version | 3.8.30 | ||
Summary | 0003265: Outgoing batch query causes deadlocks | ||||
Description | The following query was found to cause deadlocks on SQL Server. Since this is a reporting query, used by Symmetric Pro dashboard, it will be changed to use the "dirty" SQL template, instead of the regular SQL template. Below is an example of the error: 2017-10-02 12:59:14,806 ERROR [gui] [a] [ui-refresher-1] Exception while refreshing class com.jumpmind.symmetric.console.ui.screen.c StackTraceKey.init [SqlException:1689863977] org.jumpmind.db.sql.SqlException: Failed to execute sql: select min(b.batch_id) as batch_id, b.node_id, b.status, b.channel_id from sym_outgoing_batch b where status != 'OK' and status != 'RT' group by b.node_id, b.status, b.channel_id at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:300) at org.jumpmind.db.sql.JdbcSqlReadCursor.<init>(JdbcSqlReadCursor.java:120) at org.jumpmind.db.sql.JdbcSqlTemplate.queryForCursor(JdbcSqlTemplate.java:140) at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:199) at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:195) at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:185) at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:121) at org.jumpmind.symmetric.service.impl.OutgoingBatchService.getNextOutgoingBatchForEachNode(OutgoingBatchService.java:558) at com.jumpmind.symmetric.console.model.DashboardInfo.refreshBatchActivity(DashboardInfo.java:135) at com.jumpmind.symmetric.console.model.DashboardInfo.refresh(DashboardInfo.java:103) at com.jumpmind.symmetric.console.ui.screen.c.onBackgroundRefresh(DashboardScreen.java:83) at com.jumpmind.symmetric.console.ui.a$1.run(BackgroundRefresherService.java:60) 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 192) 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.getNextRow(TdsCore.java:777) at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:956) at net.sourceforge.jtds.jdbc.MSCursorResultSet.cursorCreate(MSCursorResultSet.java:541) at net.sourceforge.jtds.jdbc.MSCursorResultSet.<init>(MSCursorResultSet.java:154) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:453) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:979) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.jumpmind.db.sql.JdbcSqlReadCursor.<init>(JdbcSqlReadCursor.java:97) ... 18 more | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-02 20:44 | mmichalek | New Issue | |
2017-10-02 20:44 | mmichalek | Status | new => assigned |
2017-10-02 20:44 | mmichalek | Assigned To | => mmichalek |
2017-10-02 21:00 | mmichalek | Changeset attached | => SymmetricDS 3.8 106de93c |
2017-10-05 16:45 | mmichalek | Status | assigned => resolved |
2017-10-05 16:45 | mmichalek | Resolution | open => fixed |
2017-10-05 16:45 | mmichalek | Fixed in Version | => 3.8.30 |
2017-10-06 11:53 | chenson | Status | resolved => closed |