7 Replies Latest reply on Mar 24, 2015 3:45 PM by Steven Hawkins

    Subsequent query fails on cancellation of the first query execution for Oracle based VDB

    Pranav K Novice

      Hi,

       

      I am facing an issue related to [TEIID-3275] remaining work should always be canceled - JBoss Issue Tracker. I ran a select all query over an Oracle based Source model deployed inside a VDB which has 3mn records and the maxRows property is set on the prepared statement. With the fix in the above mentioned issue, the records are returned immediately as opposed to before. But when I run the same job a second time using the same connection I get an error as shown in the trace.

       

      When I looked into the issue further I saw that the fix led to a cancel call in JDBCBaseExecution. I created a sample program which executed the same query, and iterated over the resultset. When I issued a statement.cancell() in between this program execution I saw the same issue come up. Hence when I cancel the execution in this scenario, and execute the program on the same connection, this issue comes up.

       

      WARN  [CONNECTOR] Connector worker process failed for atomic-request=yZ/Wz9pIBjUS.18.0.266

      org.teiid.translator.jdbc.JDBCExecutionException: 1013 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT

      g_0."Date", g_0."DayOfMonth", g_0."DayOfYear", g_0."IsLeapYear", g_0."IsWeekday", g_0."IsWeekend", g_0."JulianDay", g_0."JulianWeek", g_0."JulianYear

      ", g_0."MonthName", g_0."MonthNumber", g_0."Quarter", g_0."WeekOfYear", g_0."WeekdayName", g_0."WeekdayNumber", g_0."Year" FROM "TEST1"."1000rowsGtd"g_0]

      at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) ~[translator-jdbc-8.10.0.Final.jar:8.10.0.Final]

      at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:337) ~[teiid-engine-8.10.0.Final.jar:8.10.0.Final]

      at sun.reflect.GeneratedMethodAccessor254.invoke(Unknown Source) ~[na:na]

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_55]

      at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_55]

      at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:209) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]

      at com.sun.proxy.$Proxy232.execute(Unknown Source) [na:na]

      at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]

      at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]

      at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]

      at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_55]

      at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]

      at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]

      at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.10.0.Final.jar

      :8.10.0.Final]

      at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.10.0.Final.jar:8.10.0.Final]

       

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]

      at java.lang.Thread.run(Thread.java:745) [na:1.7.0_55]

      Caused by: java.sql.SQLTimeoutException: ORA-01013: user requested cancel of current operation

       

      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) ~[na:na]

      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ~[na:na]

      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) ~[na:na]

      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) ~[na:na]

      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) ~[na:na]

      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) ~[na:na]

      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) ~[na:na]

      at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884) ~[na:na]

      at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167) ~[na:na]

      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289) ~[na:na]

      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584) ~[na:na]

      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628) ~[na:na]

      at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493) ~[na:na]

      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) ~[commons-dbcp-1.4.jar:1.4]

      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) ~[commons-dbcp-1.4.jar:1.4]

      at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) ~[translator-jdbc-8.10.0.Final.jar:8.10.0.Final]

      ... 17 common frames omitted

      WARN  [PROCESSOR] TEIID30020 Processing exception for request yZ/Wz9pIBjUS.18 'TEIID30504 vds_orc2-orcl-database: 1013 TEIID11008:TEIID1100

      4 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0."Date", g_0."DayOfMonth", g_0."DayOfYear", g_0."IsLeapYear", g_0."IsWeekday", g_0

      ."IsWeekend", g_0."JulianDay", g_0."JulianWeek", g_0."JulianYear", g_0."MonthName", g_0."MonthNumber", g_0."Quarter", g_0."WeekOfYear", g_0."WkdayNa

      me", g_0."WeekdayNumber", g_0."Year" FROM "TEST1"."1000rowsGtd" g_0]'. Originally TeiidProcessingException 'ORA-01013: user requested cancel of curren

      t operation

      Could you please point me to why this would be coming up?

       

      Thanks,

      Pranav