Vyacheslav Koptilin created IGNITE-16090:
--------------------------------------------
Summary: ItMetadataTest.columnOrder cannot be run twice in the
same JVM
Key: IGNITE-16090
URL: https://issues.apache.org/jira/browse/IGNITE-16090
Project: Ignite
Issue Type: Bug
Affects Versions: 3.0.0-alpha3
Reporter: Vyacheslav Koptilin
The attempt to run the _ItMetadataTest.columnOrder_ test twice in the same JVM
resaults in the following exception:
{noformat}
class org.apache.ignite.lang.IgniteException: An error occurred while query
executing.
at
org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.checkException(RootNode.java:278)
at
org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.exchangeBuffers(RootNode.java:265)
at
org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.hasNext(RootNode.java:189)
at
org.apache.ignite.internal.processors.query.calcite.exec.ClosableIteratorsHolder$DelegatingIterator.hasNext(ClosableIteratorsHolder.java:132)
at
org.apache.ignite.internal.processors.query.calcite.util.TransformingIterator.hasNext(TransformingIterator.java:44)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at
java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at
java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at
org.apache.ignite.internal.calcite.util.Commons.getAllFromCursor(Commons.java:31)
at
org.apache.ignite.internal.calcite.util.QueryChecker.check(QueryChecker.java:380)
at
org.apache.ignite.internal.calcite.ItMetadataTest.columnOrder(ItMetadataTest.java:106)
...
Caused by: java.lang.NullPointerException: table
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at org.apache.calcite.rel.core.TableScan.<init>(TableScan.java:72)
at org.apache.calcite.rel.core.TableScan.<init>(TableScan.java:90)
at
org.apache.ignite.internal.processors.query.calcite.rel.ProjectableFilterableTableScan.<init>(ProjectableFilterableTableScan.java:89)
at
org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableScan.<init>(IgniteTableScan.java:44)
at SC.apply(Unknown Source)
at
org.apache.ignite.internal.processors.query.calcite.externalize.RelJson$RelFactory.apply(RelJson.java:117)
at
org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRel(RelJsonReader.java:126)
at
org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRels(RelJsonReader.java:117)
at
org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.read(RelJsonReader.java:108)
at
org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.fromJson(RelJsonReader.java:81)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareFragment(ExecutionServiceImpl.java:404)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.lambda$onMessage$6(ExecutionServiceImpl.java:582)
at
org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.lambda$queryPlan$0(QueryPlanCacheImpl.java:47)
at
com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$13(BoundedLocalCache.java:2457)
at
java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1908)
at
com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2455)
at
com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2438)
at
com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:107)
at
org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:47)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:580)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.lambda$start$1(ExecutionServiceImpl.java:189)
at
org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:154)
at
org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.lambda$onMessage$3(MessageServiceImpl.java:124)
at
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:78)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Suppressed: java.lang.NullPointerException: table
... 28 more
{noformat}
It seems to me, the root cause of the issue is wide using _static final_ fields
in the calcite engine. So, any Ignite node will be stuck with the same instance
of variables (in general, this approach does not look good enough, I think)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)