[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2224) executeUpdate causes coarse cache invalidation

Vladimir Kralik (JIRA) noreply at atlassian.com
Fri Jul 9 02:34:13 EDT 2010


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

Vladimir Kralik commented on HHH-2224:
--------------------------------------

2 Steve : 
This behaviour should be documented a switched off by default, and senior developer can make decision, if he switches it on. I would like to have this possibility. 

Why do you thing, that this behaviour is incorrect ? There is a lot of ways how to update data outside of hibernate ( for example : triggers ), so the senior developer have to remember for which table can use cache and for which cannot. I've a big database ( 1TB ), about 400 users and 10 application servers in cluster, changes are going too quickly, so I've caches only for several codelist tables. 

> How do you correlate a read-only cache and things that can be updated?
Things that can be updated don't have cache.
Cached read-only tables/codelists are changed (only operations are INSERT and UPDATE of valid_to-column ) during system maintainance time.

2 rajesh : Your solution is not for me, because I don't have SQL-query extracted outside java-code. I compute this query inside of application.


> executeUpdate causes coarse cache invalidation
> ----------------------------------------------
>
>                 Key: HHH-2224
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2224
>             Project: Hibernate Core
>          Issue Type: Improvement
>    Affects Versions: 3.2.0.ga
>         Environment: Hibernate 3.2.0.ga, Oracle 9.2
>            Reporter: Stefan Fleiter
>         Attachments: bulk_testcase.zip, hibernate-3.2.6_p4.patch
>
>
> I am developing an application and want to mix bulk-updates
> with normal hibernate operations.
> The bulk updates work fine, but invalidate the whole region and I've found
> no possibility to prevent this.
> There would be 3 options to improve:
> - Invalidate only the modified objects if the ids where given as Query-parameters.
> - Let me deactivate the invalidation so I can invalidate the affected objects myself.
> - Transform the DML to a select to gather the objects to invalidate before executing the DML
> The reference documentation does not mention caching at all:
> http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#batch-direct
> The best documentation I've found is:
> http://blog.hibernate.org/cgi-bin/blosxom.cgi/2005/07/19#dml-basic
> Maybe this could be added to the reference documentation...
> I already posted this at the forum
> http://forum.hibernate.org/viewtopic.php?t=966775
> but did not get a single answer.
> I've attached a testcase for this.

-- 
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