[JBoss JIRA] (ISPN-3680) Inconsistent way to use the column id in the JdbcBinaryCacheStore
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-3680?page=com.atlassian.jira.plugin.... ]
Mircea Markus commented on ISPN-3680:
-------------------------------------
thanks for reporting this [~nfilotto], care to create a pull request for this?
> Inconsistent way to use the column id in the JdbcBinaryCacheStore
> -----------------------------------------------------------------
>
> Key: ISPN-3680
> URL: https://issues.jboss.org/browse/ISPN-3680
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.2.7.Final, 5.3.0.Final, 6.0.0.CR1
> Reporter: Nicolas Filotto
> Assignee: Mircea Markus
>
> I met some issues with (at least) H2 and JdbcBinaryCacheStore that prevent to modify a value in the cache store which is quite annoying. After a deeper look, I realized that it was due to the method {{JdbcBinaryCacheStore.loadBucket(Integer keyHashCode)}} that uses {{setInt}} instead of {{setString}} like in updateBucket and insertBucket to set the id as parameter to the query. With HSQLDB and MySQL, it works normally but with H2, the result of the query is always empty so it always tries to add a new entry which of course fails because of the integrity constraint on the primary key (aka the id).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 7 months
[JBoss JIRA] (ISPN-3680) Inconsistent way to use the column id in the JdbcBinaryCacheStore
by Nicolas Filotto (JIRA)
[ https://issues.jboss.org/browse/ISPN-3680?page=com.atlassian.jira.plugin.... ]
Nicolas Filotto updated ISPN-3680:
----------------------------------
Git Pull Request: https://github.com/infinispan/infinispan/pull/2190
> Inconsistent way to use the column id in the JdbcBinaryCacheStore
> -----------------------------------------------------------------
>
> Key: ISPN-3680
> URL: https://issues.jboss.org/browse/ISPN-3680
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.2.7.Final, 5.3.0.Final, 6.0.0.CR1
> Reporter: Nicolas Filotto
> Assignee: Mircea Markus
>
> I met some issues with (at least) H2 and JdbcBinaryCacheStore that prevent to modify a value in the cache store which is quite annoying. After a deeper look, I realized that it was due to the method {{JdbcBinaryCacheStore.loadBucket(Integer keyHashCode)}} that uses {{setInt}} instead of {{setString}} like in updateBucket and insertBucket to set the id as parameter to the query. With HSQLDB and MySQL, it works normally but with H2, the result of the query is always empty so it always tries to add a new entry which of course fails because of the integrity constraint on the primary key (aka the id).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 7 months
[JBoss JIRA] (ISPN-3680) Inconsistent way to use the column id in the JdbcBinaryCacheStore
by Nicolas Filotto (JIRA)
Nicolas Filotto created ISPN-3680:
-------------------------------------
Summary: Inconsistent way to use the column id in the JdbcBinaryCacheStore
Key: ISPN-3680
URL: https://issues.jboss.org/browse/ISPN-3680
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 6.0.0.CR1, 5.3.0.Final, 5.2.7.Final
Reporter: Nicolas Filotto
Assignee: Mircea Markus
I met some issues with (at least) H2 and JdbcBinaryCacheStore that prevent to modify a value in the cache store which is quite annoying. After a deeper look, I realized that it was due to the method {{JdbcBinaryCacheStore.loadBucket(Integer keyHashCode)}} that uses {{setInt}} instead of {{setString}} like in updateBucket and insertBucket to set the id as parameter to the query. With HSQLDB and MySQL, it works normally but with H2, the result of the query is always empty so it always tries to add a new entry which of course fails because of the integrity constraint on the primary key (aka the id).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 7 months
[JBoss JIRA] (ISPN-3558) PutForExternalRead won't work after a clear(), when both in same tx
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-3558?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-3558:
----------------------------------------
[~sannegrinovero], as per our conversation last week, did you end up following up with [~mircea.markus] on using a flag to make the clear non-transactional (even if cache is transactional)? That would fix this issue.
> PutForExternalRead won't work after a clear(), when both in same tx
> -------------------------------------------------------------------
>
> Key: ISPN-3558
> URL: https://issues.jboss.org/browse/ISPN-3558
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.Beta1
> Reporter: Galder Zamarreño
> Assignee: William Burns
> Priority: Blocker
> Labels: dm
> Fix For: 6.0.0.Final
>
>
> {code}
> public void testPutForExternalReadAfterClear() throws Exception {
> cache.put(1, "v1");
> tm().begin();
> try {
> cache.getAdvancedCache().clear();
> cache.putForExternalRead(1, "v1");
> assertEquals("v1", cache.get(1));
> } finally {
> tm().commit();
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 7 months