Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3267

OPTION NOCACHE causes ConcurrentModificationException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.7.1, 8.10, 8.4.5
    • 8.4.3, 8.7.1, 8.9
    • Query Engine
    • None

      I have the following virtual procedure.

      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
      

      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.

      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]
      

        1. test.csv
          0.1 kB
        2. test.vdb
          105 kB

              rhn-engineering-shawkins Steven Hawkins
              rhn-support-hokuda Hisanobu Okuda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: