[infinispan-issues] [JBoss JIRA] Commented: (ISPN-106) JdbcXXXCacheStore should honor cacheName

Manik Surtani (JIRA) jira-events at lists.jboss.org
Mon Jul 20 06:25:29 EDT 2009


    [ https://jira.jboss.org/jira/browse/ISPN-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12476826#action_12476826 ] 

Manik Surtani commented on ISPN-106:
------------------------------------

I believe different caches should use unique tables, to reduce contention on table-level locks in the DB.

The code snippet you have above should also become a unit test for all cache stores (BaseCacheStoreTest?) to ensure cache stores store stuff in unique locations.

> JdbcXXXCacheStore should honor cacheName
> ----------------------------------------
>
>                 Key: ISPN-106
>                 URL: https://jira.jboss.org/jira/browse/ISPN-106
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Loaders and Stores
>    Affects Versions: 4.0.0.ALPHA5
>            Reporter: Klaus Friedel
>            Assignee: Manik Surtani
>
> Creating multiple caches from a CacheManager configured with a JdbcXXXCacheStore results in unpredicted behaviour:
> After creating a CacheManger that persists its entries with a JdbcXXXCacheStore one will see strange behaviour like this:
> Cache fooCache = cacheManager.getCache("foo");
> Cache barCache = cacheManager.getCache("bar");
> // single put:
> fooCache.put(42, "Hello World");
> After restart :
> fooCache.contains(42); // true
> barCache.contains(42); // true !!!!
> To circumvent this behaviour the only solution is to create one CacheStore per Cache. So one migth end up using a lot of different CacheManagers.
> The best solution IMHO would be to add sopport for a "cacheName" column to "TableManipulation". So different caches could share the same table.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list