[
https://issues.jboss.org/browse/TEIID-3982?page=com.atlassian.jira.plugin...
]
Kylin Soong commented on TEIID-3982:
------------------------------------
The Stack track hints BlockedException throw while QueryProcessor init, But this
*Strange*, in my debug, the Exception throw in BatchCollector's collectTuples(), in
processMore() method.
process() -> processMore() -> collector.collectTuples()
QueryProcessor init happens in processNew(), which happens before processMore(), each
request only executed 1 time, and not error happen.
BlockedException throw twice for each Query
-------------------------------------------
Key: TEIID-3982
URL:
https://issues.jboss.org/browse/TEIID-3982
Project: Teiid
Issue Type: Quality Risk
Components: Query Engine
Affects Versions: 9.x
Reporter: Kylin Soong
Assignee: Steven Hawkins
Fix For: 9.x
I have met a question while I was runing
[
embedded-portfolio](https://github.com/teiid/teiid-embedded-examples/tree...
example, Even the Query can get result correctly, but each query can cause
BlockedException throw 2 times, a DEBUG log be recorded 2 times for each query:
{code}
2016-02-18 14:58 754 DEBUG [org.teiid.PROCESSOR] (main) Request Thread 2Py78gPmtfcm.0 -
processor blocked
2016-02-18 14:58 930 DEBUG [org.teiid.PROCESSOR] (main) Request Thread 2Py78gPmtfcm.0 -
processor blocked
{code}
The Exception stack trace in my test looks
{code}
org.teiid.common.buffer.BlockedException
at org.teiid.common.buffer.BlockedException.<clinit>(BlockedException.java:39)
at org.teiid.query.processor.QueryProcessor.<clinit>(QueryProcessor.java:58)
at org.teiid.dqp.internal.process.Request.createProcessor(Request.java:334)
at org.teiid.dqp.internal.process.Request.processRequest(Request.java:465)
at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:633)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:333)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:271)
at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:306)
at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:238)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:180)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:178)
at com.sun.proxy.$Proxy11.executeRequest(Unknown Source)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:670)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:536)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1073)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:323)
at org.teiid.example.util.JDBCUtils.execute(JDBCUtils.java:85)
at
org.teiid.test.embedded.process.TeiidEmbeddedPortfolioProcess.main(TeiidEmbeddedPortfolioProcess.java:58)
{code}
h3. Further investigation
As [1], around line 350,
{code}
} catch (BlockedException e) {
e.printStackTrace();
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL))
{
LogManager.logDetail(LogConstants.CTX_DQP, "Request Thread",
requestID, "- processor blocked"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (e == BlockedException.BLOCKED_ON_MEMORY_EXCEPTION || e instanceof
ExpiredTimeSliceException) {
//requeue
this.moreWork();
}
}
{code}
Why each query need block processor 2 times?
[1]
https://github.com/teiid/teiid/blob/master/engine/src/main/java/org/teiid...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)