Issue Details (XML | Word | Printable)

Key: NUCCORE-738
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

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

Non-tx persist resulting in failure to persist can leave object in L1 cache as P_NEW

Created: 05/Jul/11 09:47 AM   Updated: 01/Aug/11 10:23 AM   Resolved: 05/Jul/11 11:13 AM
Component/s: Transactions
Affects Version/s: 3.0.0.m5
Fix Version/s: 3.0.0.m6

 Description  « Hide
When persisting non-transactional there is obviously no rollback. If we try to persist an object and it processes that object but during cascade persist it finds a problem the persist will fail but the first object is already in the L1 cache.

We likely need to
1. take a snapshot of the L1 cache before atomic non-tx persists and remove additional objects if there is a failure
2. disconnect any added StateManagers from these cached objects

Andy Jefferson added a comment - 05/Jul/11 11:13 AM
SVN trunk now fixes the behaviour in persistObject() so that any objects added to the L1 cache during the non-tx persist are removed if an exception is thrown. Doesn't do anything about disconnecting state managers yet since that will be much more work

Andy Jefferson made changes - 05/Jul/11 11:13 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0.0.m6 [ 11266 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 01/Aug/11 10:23 AM
Status Resolved [ 5 ] Closed [ 6 ]