Bug 1102968

Summary: [GSS](6.4.0)HHH-9231 Uncommitted data can remain in transactional collection cache after rollback if collection is initialized after flush
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Stephen Fikes <sfikes>
Component: HibernateAssignee: Gail Badner <gbadner>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 6.2.2CC: cdewolf, dandread, jmartisk, kkhan, msimka
Target Milestone: DR11   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
When using Infinispan with a transactional caching strategy, users may experience the following issue if a transaction involves flushing a new entity to the database, then initializing a collection containing that new entity: If a transaction rolls back, the new entity may remain in the level 2 collection cache. This can result in `javax.persistence.EntityNotFoundException` error in a later transaction, if that collection is initialized from the level 2 collection cache. This issue is expected to be resolved in a later release of the product.
Story Points: ---
Clone Of:
: 1102974 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1102974, 1121629    
Attachments:
Description Flags
EAP 6.2.2 test case based on EAP quick start
none
EAP 6.2.2 test case based on EAP quick start (with README)
none
EAP 6.2.2 test case based on EAP quick start (with *corrected* README) none

Description Stephen Fikes 2014-05-30 00:19:30 UTC
Created attachment 900571 [details]
EAP 6.2.2 test case based on EAP quick start

Description of problem:
After adding an entity to an association (collection) and rolling back the transaction, the reverted entity remains in the association in the level 2 cache.

Version-Release number of selected component (if applicable):
Hibernate 4.2.7.SP1

How reproducible:
Consistently

Steps to Reproduce:
1. Add element to an association (collection)
2. Persist the element added
3. flush
4. Navigate from the one side to the many side
5. Raise an exception which rolls back the transaction
6. Repeat the navigation from the one to the many side

Actual results:
At #6, a javax.persistence.EntityNotFoundException is thrown

Expected results:
The connection at #6 should not contain the rolled back entity

Additional info:
Possibly the same as https://hibernate.atlassian.net/browse/HHH-5690

Comment 1 Stephen Fikes 2014-05-30 14:03:09 UTC
Created attachment 900849 [details]
EAP 6.2.2 test case based on EAP quick start (with README)

Comment 2 Stephen Fikes 2014-05-30 22:55:07 UTC
Created attachment 901002 [details]
EAP 6.2.2 test case based on EAP quick start (with *corrected* README)

Comment 4 sgilda 2014-07-31 13:07:22 UTC
Per Bug 1125169, set the 'requires_doc_text' flag to '-' because it this one is targeted for 6.4 and duplicates Bug 1102974

Comment 5 Gail Badner 2014-11-21 02:46:23 UTC
Fixed for 6.4.0

Comment 6 Kabir Khan 2014-11-21 11:34:44 UTC
Fixed by Hibernate 4.2.16.Final upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1121629

Comment 7 Jan Martiska 2014-11-27 12:19:48 UTC
Verified in EAP 6.4.0.DR11 / hibernate 4.2.16.Final-redhat-1