]
RH Bugzilla Integration commented on TEIID-3267:
------------------------------------------------
Filip Elias <felias(a)redhat.com> changed the Status of [bug
OPTION NOCACHE causes ConcurrentModificationException
-----------------------------------------------------
Key: TEIID-3267
URL:
https://issues.jboss.org/browse/TEIID-3267
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.4.3, 8.7.1, 8.9
Reporter: Hisanobu Okuda
Assignee: Steven Hawkins
Fix For: 8.7.1, 8.10, 8.4.5
Attachments: test.csv, test.vdb
I have the following virtual procedure.
{code}
CREATE VIRTUAL PROCEDURE
BEGIN
DECLARE string VARIABLES.strSql = 'select v1.id, v2.ccc2 from vvv1.vvv as v1,
vvv2.vvv as v2 where v1.id=v2.id option nocache v1';
EXECUTE IMMEDIATE VARIABLES.strSql AS id string, name string;
END
{code}
When I specify no argument for 'option nocache', it works. But, when I specify a
view name as an argument for 'option nocache', it throws
ConcurrentModificationException.
{code}
17:34:04,285 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue0) TEIID30019
Unexpected exception for request nSVB2nm4gO3M.0:
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859) [rt.jar:1.7.0_45]
at java.util.ArrayList$Itr.next(ArrayList.java:831) [rt.jar:1.7.0_45]
at
org.teiid.query.optimizer.relational.RelationalPlanner.generatePlan(RelationalPlanner.java:609)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.optimizer.relational.RelationalPlanner.addNestedCommand(RelationalPlanner.java:1173)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.optimizer.relational.RelationalPlanner.buildTree(RelationalPlanner.java:1071)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:904)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:863)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.optimizer.relational.RelationalPlanner.generatePlan(RelationalPlanner.java:619)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:226)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:186)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:356)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:283)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:257)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:149)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:149)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:112)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:157)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:139)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:435)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:320)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:248)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:269)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214)
[teiid-engine-8.4.1-redhat-7.hokuda.jar:8.4.1-redhat-7]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
{code}