[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3817) JBC second level cache integration can cache stale collection data

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Jun 23 16:08:37 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-3817:
--------------------------------

    Fix Version/s:     (was: 3.3.2)
                   3.3.x

> JBC second level cache integration can cache stale collection data
> ------------------------------------------------------------------
>
>                 Key: HHH-3817
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3817
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: caching (L2)
>            Reporter: Brian Stansberry
>            Assignee: Brian Stansberry
>             Fix For: 3.3.x
>
>
> Scenario with two transactions dealing with a single collection:
> tx1 reads collection, cache miss
> tx1 goes to database to read collection
> tx2 reads collection, cache miss
> tx2 goes to database to read collection
> tx2 does JBC putForExternalRead to store empty collection
> tx2 updates collection
> tx2 removes collection from JBC (since any collection update triggers a org.hibernate.cache.Cache.evict which is implemented as a JBC removeNode)
> tx1 does JBC putForExternalRead to store empty collection -- STALE DATA
> With entities, if the db is using REPEATABLE_READ this won't be a problem, as the DB won't allow the tx2 update until tx1 commits.  With a collection there is nothing to lock on. It would be a problem for entities with READ_COMMITTED as well.

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

        



More information about the hibernate-issues mailing list