History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: HHH-352
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Steve Ebersole
Reporter: Steve Ebersole
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hibernate Core

HQL bulk and cache

Created: 15/Apr/05 08:30 AM   Updated: 15/Jul/05 08:52 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1 beta 1

Time Tracking:
Not Specified


 Description  « Hide
Execution of HQL bulk statements leave potentially just deleted entities in both the session and shared caches.

Not sure we can really do anything "selective" regarding the session cache.

But for the second level cache, we should be able to collect the entity-names affected and use them to purge those regions. That works great for the entities, but still leaves any collections the entity may be involved in.

Not sure this is even worthwhile, but want to take a closer look.

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Gavin King - 15/Apr/05 10:48 PM
We do need to handle the second-level cache, but not the session cache.

Gili - 18/May/05 11:59 PM
Gavin,

Can you please comment on why we cannot update the session cache on bulk operations? Is there a suggested workaround? In the meantime, can we update the documentation (with workarounds) before 3.1? (There is already an issue open against the missing documentation)

Steve Ebersole - 06/Jul/05 11:47 PM
Mainly, we don't know which ids were affected by these operations, as they happen strictly in the database and not in memory. And unlikely the second-level cache, it is not a good idea to remove all entries for the given entity from the session cache; the reasoning has to do with the "data uniqueing" portion of the session cache role.

Steve Ebersole - 07/Jul/05 02:56 PM
Done. It does account for both the entity cache region, as well as the collection regions for any collection roles in which the entity might participate.