Rows which have been inserted into cache directly through hotrod protocol can't be deleted or updated (update command returns correct number of rows to be updated but no rows are actually updated) using the Infinispan-dsl-cache translator. If the rows are inserted through Infinispan-dsl-cache translator, then they can be deleted or updated. Server1.log contains logs for an attempt to delete row which was previously directly inserted through hotrod protocol. It contains logs for two queries: 1, select * from smalla where intkey = 10 (returns 1 row) 2, delete from smalla where intkey = 10 (deletes 0 rows) Server2.log contains logs for an attempt to delete row which was inserted using the Infinispan-dsl-cache translator. It contains logs for two queries: 1, insert into smalla(intKey, stringKey,booleanValue) values(141,'ss',false) (correctly inserts 1 row) 2, delete from smalla where intkey = 10 (correctly deletes 1 row)
Created attachment 1039435 [details] Unsuccessful delete statement
Created attachment 1039436 [details] server1.log
Created attachment 1039437 [details] server2.log
Sorry I mistyped the second set of queries. It should have been: 1, insert into smalla(intKey, stringKey,booleanValue) values(143,'ss',false) (correctly inserts 1 row) 2, delete from smalla where intkey = 143 (correctly deletes 1 row)
I've been unable to determine the difference between QE's JDG install and mine that would incur this problem. I have no issue deleting the objects that were inserted by the JDG quick start client that inserts thru Hot Rod Client. More work needed.
Filip, I realized that the JDG cache key is of type String, but the primary key that's defined in the Teiid model is of type Integer. Those must match. I noticed the documentation wasn't clear, so I've updated it upstream and will ask David to add the following to the documentation. David, we need to add to the DSL translator the following note: The data type for the primary key attribute in the class must match the JDG cache key data type.
Consolidating BZ: 1232240 under this blocker: Infinispan-dsl-cache translator: NPE when inserting data if a table doesn't have primary key defined
Colidating BZ 1238357 under this blocker. infinispan-cache-dsl - Exception: Sentence already started. Cannot use 'having(..)' again.
Consolidated BZ: 1232182 under this blocker. Infinispan-dsl-cache translator: can't insert value into BYTE and BIGINTEGER columns
*** Bug 1232182 has been marked as a duplicate of this bug. ***
*** Bug 1232240 has been marked as a duplicate of this bug. ***
*** Bug 1238357 has been marked as a duplicate of this bug. ***
*** Bug 1232649 has been marked as a duplicate of this bug. ***
Steven Hawkins <shawkins> updated the status of jira TEIID-3536 to Resolved
Committed changes for : - [1232182] Infinispan-dsl-cache translator: can't insert value into BYTE and BIGINTEGER columns - [1238357] infinispan-cache-dsl - Exception: Sentence already started. Cannot use 'having(..)' again. - [1232240] Infinispan-dsl-cache translator: NPE when inserting data if a table doesn't have primary key defined Notes: - regarding Comment #8, and the data type for the primary key attribute in the class must match the JDG cache key data type. This is no longer true. With the changes related to [1232182], the logic will now transform the value to the native type of the cache key type. In order to know this, an enhancement to the connector-infinispan-dsl configuration was changed for the property CacheTypeMap to be in the format of: cacheName:className[;pkFieldName[:cacheKeyJavaType]] adding: optional cacheKeyJavaType Example that was used with the BQT testing: smallARemotecache:org.jboss.qe.jdg_remote.pojo.SmallA;intKey:java.lang.String
Verified on DV 6.2 ER4
Steven Hawkins <shawkins> updated the status of jira TEIID-3536 to Closed