DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-1204
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Kaarel Kann
Votes: 0
Watchers: 0

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

Object is left in 2nd level cache when commit() fails

Created: 13/May/14 10:10 AM   Updated: 30/May/14 09:29 AM   Resolved: 29/May/14 05:32 PM
Component/s: Transactions
Affects Version/s: 4.0.0.m2
Fix Version/s: 4.0.0.release

File Attachments: 1. Zip Archive (8 kB)
2. Java Source File (3 kB)

Environment: any

Severity: Test/Acceptance

 Description  « Hide
When exception is thrown during commit (but after flush) then object is left in 2nd level cache making application state inconsistent with database.

Kaarel Kann added a comment - 13/May/14 10:11 AM
attached test files

Kaarel Kann made changes - 13/May/14 10:11 AM
Field Original Value New Value
Attachment [ 12065 ]
Attachment [ 12066 ]
Andy Jefferson added a comment - 28/May/14 11:58 AM
Suggestion of the simplest way of fixing this : in the method that updates the L2 cache, create a Set of the ids of the objects that were updated, and then in postRollback evict all of these id's from the L2 cache.

Andy Jefferson added a comment - 29/May/14 05:32 PM
Patch is now in GitHub. Thx

Andy Jefferson made changes - 29/May/14 05:32 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 4.0.0.release [ 12080 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 30/May/14 09:29 AM
Status Resolved [ 5 ] Closed [ 6 ]