[JBoss JIRA] (TEIID-4603) Insert issue when cache contains multiple pojo's with the same key value
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4603?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4603:
------------------------------------
I have two POJOs, two resource-adapters configured, single JDG instance and cache is used.
Tested usecase:
{code}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
SELECT * FROM jdgSource1.SmallA;
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
SELECT * FROM jdgSource2.CustomerReport;
SELECT * FROM jdgSource1.SmallA;
{code}
Everything works as expected but the last query. It returns empty resultset, but there should be single row. (Second query returned correctly 1 row)
The issue seems to be that last INSERT somehow erases the previous contents.
When you try:
{code}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
you get only one row by the fourth query.
The reason is:
You have two POJOs, both have an id specified (different column names). When there is common Id value for different POJOs, in previous example it is value 1 for both 'intKey' and 'customerId', the object in jdg cache get overwritten. It is due to the fact, that objects in JDG are being stored in key-value way.
This is undesirable behaviour, because an object of one POJO class is overwritten by an object of different POJO class. This is blocking issue.
Note: if the id is unique across all POJOs inserted into single cache, this problem doesn't occur:
{code}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(3,3);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
in this case, correct values are being returned.
> Insert issue when cache contains multiple pojo's with the same key value
> ------------------------------------------------------------------------
>
> Key: TEIID-4603
> URL: https://issues.jboss.org/browse/TEIID-4603
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.2
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Blocker
> Fix For: 9.2, 8.12.8.6_3
>
>
> There is an INSERT issue when there are multiple pojo's stored in the same cache and the keys' overlap (meaning the different types of pojo's have the same key).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4603) Insert issue when cache contains multiple pojo's with the same key value
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4603?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-4603:
-------------------------------
Description: There is an INSERT issue when there are multiple pojo's stored in the same cache and the keys' overlap (meaning the different types of pojo's have the same key). (was: Fix the select * (ALL) logic so that it can work when there are multiple object types in the cache. The select ALL should only be selecting based on the object type associated with that table.)
> Insert issue when cache contains multiple pojo's with the same key value
> ------------------------------------------------------------------------
>
> Key: TEIID-4603
> URL: https://issues.jboss.org/browse/TEIID-4603
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.2
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Blocker
> Fix For: 9.2, 8.12.8.6_3
>
>
> There is an INSERT issue when there are multiple pojo's stored in the same cache and the keys' overlap (meaning the different types of pojo's have the same key).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4590) Fix the Select ALL logic so that it works when different object types exists
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4590?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4590:
------------------------------------
The INSERT and the SELECT issues are 2 separate issues. The INSERT issue brings up the need to discuss JDG Cache design so that the key's don't overlap. This will be something that needs to be documented, because JDG is just a key/value pair. But this should all be discussed on a separate jira (which I'll create) to discuss how the translator may need to be changed to perform the desired behavior.
> Fix the Select ALL logic so that it works when different object types exists
> ----------------------------------------------------------------------------
>
> Key: TEIID-4590
> URL: https://issues.jboss.org/browse/TEIID-4590
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.2
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Blocker
> Fix For: 9.2, 8.12.8.6_3
>
>
> Fix the select * (ALL) logic so that it can work when there are multiple object types in the cache. The select ALL should only be selecting based on the object type associated with that table.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4603) Insert issue when cache contains multiple pojo's with the same key value
by Van Halbert (JIRA)
Van Halbert created TEIID-4603:
----------------------------------
Summary: Insert issue when cache contains multiple pojo's with the same key value
Key: TEIID-4603
URL: https://issues.jboss.org/browse/TEIID-4603
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 9.2
Reporter: Van Halbert
Assignee: Van Halbert
Priority: Blocker
Fix For: 9.2, 8.12.8.6_3
Fix the select * (ALL) logic so that it can work when there are multiple object types in the cache. The select ALL should only be selecting based on the object type associated with that table.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4601) Infinispan DSL Translator: cannot insert into byte array column
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4601?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-4601:
-------------------------------
Fix Version/s: 9.2
> Infinispan DSL Translator: cannot insert into byte array column
> ---------------------------------------------------------------
>
> Key: TEIID-4601
> URL: https://issues.jboss.org/browse/TEIID-4601
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 9.2
>
>
> When a POJO class field is of type byte[] , insert into a table, which is mapped to the POJO class fails with:
> {code:plain}
> Caused by: org.teiid.translator.TranslatorException: Conversion from String to byte is not supported
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:624) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> Caused by: java.lang.IllegalArgumentException: Conversion from String to byte is not supported
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:797) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:768) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.translator.object.ClassRegistry.executeSetMethod(ClassRegistry.java:139) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:608) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> {code}
> POJO class:
> {code:java|title=SmallA.proto}
> package org.jboss.qe.jdg.remote.protobuf;
> message SmallA {
> required int32 intKey = 1;
> optional string stringNum = 2;
> required string stringKey = 3;
> optional float floatNum = 4;
> optional string bigIntegerValue = 5;
> optional int32 shortValue = 6;
> optional double doubleNum = 7;
> optional bytes objectValue = 8;
> optional int32 intNum = 9;
> optional string bigDecimalValue = 10;
> optional int64 longNum = 11;
> optional bool booleanValue = 12;
> optional int64 timeStampValue = 13;
> optional int32 byteNum = 14;
> optional int64 timeValue = 15;
> optional int64 dateValue = 16;
> optional int32 charValue = 17;
> }
> {code}
> Java code used to insert:
> {code:java}
> PreparedStatement pSt = con.prepareStatement(
> "INSERT INTO jdgSource1.SmallA(intKey,stringNum,stringKey,floatNum,bigIntegerValue,shortValue,doubleNum,objectValue,intNum,bigDecimalValue,longNum,booleanValue,timeStampValue,byteNum,timeValue,dateValue,charValue) VALUES"
> + "(1,'1','1',1.0,1,1,1,?,1,1.00,1,true,{ts '2016-01-01 12:00:00'},1,'12:00:00','2016-01-01','1')");
> pSt.setBytes(1, "1".getBytes());
> pSt.executeUpdate();
> {code}
> The cause is that internally the object translator uses StringUtil which can't handle byte type.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4593) Failed to load module org.jboss.teiid.rest-service" due to change in feature pack
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4593?page=com.atlassian.jira.plugin... ]
Kylin Soong closed TEIID-4593.
------------------------------
> Failed to load module org.jboss.teiid.rest-service" due to change in feature pack
> ---------------------------------------------------------------------------------
>
> Key: TEIID-4593
> URL: https://issues.jboss.org/browse/TEIID-4593
> Project: Teiid
> Issue Type: Sub-task
> Components: Embedded
> Affects Versions: 9.2
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Fix For: 9.2
>
>
> The following error message in swarm ubjar start
> {code}
> 2016-11-21 11:50:12,207 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 16) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "teiid")]) - failure description: "TEIID50069 Failed to load module org.jboss.teiid.rest-service"
> 2016-11-21 11:50:12,222 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 16) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "teiid")]) - failure description: "TEIID50069 Failed to load module org.jboss.teiid.rest-service"
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4602) Teiid throws NPE if multi-value insert is issued on global temporary table
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4602:
-----------------------------------
Summary: Teiid throws NPE if multi-value insert is issued on global temporary table
Key: TEIID-4602
URL: https://issues.jboss.org/browse/TEIID-4602
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.7.6_3
Reporter: Juraj Duráni
Assignee: Steven Hawkins
Fix For: 9.2, 9.1.2
If multi-value insert is issued \[1\] on global temporary table \[2\], Teiid throws NPE \[3\]. Any subsequent query end with AssertionError \[4\].
{code:sql|title= \[1\] Query}
INSERT INTO tabglob (id, name) VALUES (1, 'name1'), (2, 'name2')
{code}
{code:xml|title= \[2\] VDB}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb name="teiid-aaa" version="1">
<model name="v1" type="VIRTUAL">
<metadata type="DDL">
<![CDATA[
CREATE GLOBAL TEMPORARY TABLE tabglob (id integer PRIMARY KEY, name string) OPTIONS (UPDATABLE 'TRUE');
]]>
</metadata>
</model>
</vdb>
{code}
{code:plain|title= \[3\] Exception}
11:24:01,973 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue12) TEIID30019 Unexpected exception for request edwdbaNhKnsM.6: java.lang.NullPointerException
at org.teiid.query.processor.relational.PlanExecutionNode.open(PlanExecutionNode.java:78) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:136) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:231) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
11:24:01,974 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue12) TEIID30019 Unexpected exception for request edwdbaNhKnsM.6: java.lang.NullPointerException
at org.teiid.query.processor.relational.PlanExecutionNode.closeDirect(PlanExecutionNode.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.InsertPlanExecutionNode.closeDirect(InsertPlanExecutionNode.java:106) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalNode.close(RelationalNode.java:334) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalPlan.close(RelationalPlan.java:159) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.closeProcessing(QueryProcessor.java:252) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.close(RequestWorkItem.java:518) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:374) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
{code}
{code:plain|title= \[4\] Error}
11:26:06,639 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue21) TEIID30019 Unexpected exception for request j4uY4TiN1IJ8.4: java.lang.AssertionError: Transaction already associated with request.
at org.teiid.core.util.Assertion.failed(Assertion.java:73) [teiid-common-core-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.core.util.Assertion.assertTrue(Assertion.java:68) [teiid-common-core-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.Request.getTransactionContext(Request.java:352) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.Request.createProcessor(Request.java:342) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.Request.processRequest(Request.java:474) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4590) Fix the Select ALL logic so that it works when different object types exists
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4590?page=com.atlassian.jira.plugin... ]
Jan Stastny edited comment on TEIID-4590 at 11/25/16 4:23 AM:
--------------------------------------------------------------
The issue is not fixed properly. I have two POJOs, two resource-adapters configured, single JDG instance and cache is used.
Tested usecase:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
SELECT * FROM jdgSource1.SmallA;
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
SELECT * FROM jdgSource2.CustomerReport;
SELECT * FROM jdgSource1.SmallA;
{code}
Everything works as expected but the last query. It returns empty resultset, but there should be single row. (Second query returned correctly 1 row)
The issue seems to be that last INSERT somehow erases the previous contents.
When you try:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
you get only one row by the fourth query.
The reason is:
You have two POJOs, both have an id specified (different column names). When there is common Id value for different POJOs, in previous example it is value 1 for both 'intKey' and 'customerId', the object in jdg cache get overwritten. It is due to the fact, that objects in JDG are being stored in key-value way.
This is undesirable behaviour, because an object of one POJO class is overwritten by an object of different POJO class. This is blocking issue.
Note: if the id is unique across all POJOs inserted into single cache, this problem doesn't occur:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(3,3);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
in this case, correct values are being returned.
was (Author: jstastny):
The issue is not fixed properly. I have two POJOs, two resource-adapters configured, single JDG instance and cache is used.
Tested usecase:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
SELECT * FROM jdgSource1.SmallA;
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
SELECT * FROM jdgSource2.CustomerReport;
SELECT * FROM jdgSource1.SmallA;
{code}
Everything works as expected but the last query. It returns empty resultset, but there should be single row. (Second query returned correctly 1 row)
The issue seems to be that last INSERT somehow erases the previous contents.
When you try:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(1,1);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
you get only one row by the fourth query.
The reason is:
You have two POJOs, both have an id specified (different column names). When there is common Id value for different POJOs, in previous example it is value 1 for both 'intKey' and 'customerId', the object in jdg cache get overwritten. It is due to the fact, that objects in JDG are being stored in key-value way.
This is undesirable behaviour, because object of one POJO class is overwritten but an object of different POJO class. This is blocking issue.
Note: if the id is unique across all POJOs inserted into single cache, this problem doesn't occur:
{code:sql}
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(1,'1',true);
INSERT INTO jdgSource2.CustomerReport(customerId,totalAmount) VALUES(3,3);
INSERT INTO jdgSource1.SmallA(intKey,stringKey,booleanValue) VALUES(2,'2',false);
SELECT * FROM jdgSource1.SmallA;
{code}
in this case, correct values are being returned.
> Fix the Select ALL logic so that it works when different object types exists
> ----------------------------------------------------------------------------
>
> Key: TEIID-4590
> URL: https://issues.jboss.org/browse/TEIID-4590
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.2
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Blocker
> Fix For: 9.2, 8.12.8.6_3
>
>
> Fix the select * (ALL) logic so that it can work when there are multiple object types in the cache. The select ALL should only be selecting based on the object type associated with that table.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months