[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6600) Clustered L2 cache does not support class definition updates

Konrad Garus (JIRA) noreply at atlassian.com
Fri Sep 2 15:06:05 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43435#comment-43435 ] 

Konrad Garus commented on HHH-6600:
-----------------------------------

I sparked some discussion on my blog (with ideas for fixes): http://squirrel.pl/blog/2011/08/24/hibernate-cache-is-fundametanlly-broken

And on Reddit: http://www.reddit.com/r/java/comments/jtbsy/hibernate_cache_is_fundamentally_broken/

(Just to avoid reiterating the same arguments)

> Clustered L2 cache does not support class definition updates
> ------------------------------------------------------------
>
>                 Key: HHH-6600
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6600
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: caching (L2)
>    Affects Versions: 3.3.1
>            Reporter: Konrad Garus
>
> Hibernate caches raw arrays of field values in L2 cache. If that cache is clustered, and you want to update nodes one by one, you can get into a lot of trouble. Session may fetch a cache entry with old schema and blindly try and copy it to an entity. Sometimes it leads to ClassCastException. It also may lead to data corruption (disassembling a field as null and then saving that to database).
> There does not seem to be a way to work this around. serialVersionUID is unsupported and I don't see a way to mark entity definition version anywhere in the mapping.
> I'm experiencing this in 3.3.1, but from a brief source code inspection it seems to still be an issue in 4.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list