Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357103 - Change sets for new objects are updated with Version and Generated ID information when they should not be
Summary: Change sets for new objects are updated with Version and Generated ID informa...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-08 11:01 EDT by Tom Ware CLA
Modified: 2022-06-09 10:33 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix 2.1.x stream (6.07 KB, patch)
2011-09-08 11:18 EDT, Tom Ware CLA
no flags Details | Diff
Proposed fix trunk and 2.3.x (5.90 KB, patch)
2011-09-08 15:17 EDT, Tom Ware CLA
no flags Details | Diff
some additional changes (19.65 KB, patch)
2011-09-13 16:16 EDT, Tom Ware CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Ware CLA 2011-09-08 11:01:40 EDT
Change sets for new objects are generally empty - unless set to behave otherwise.

When this occurs in the default case, it will cause partial objects to be sent when using cache coordination.  These partial objects can result in incorrect remote caches when cache coordination is set to SEND_OBJECT_CHANGES or SEND_OBJECT_CHANGES_WITH_NEW_OBJECTS.
Comment 1 Tom Ware CLA 2011-09-08 11:18:05 EDT
Created attachment 203005 [details]
Proposed fix 2.1.x stream
Comment 2 Tom Ware CLA 2011-09-08 11:22:14 EDT
Recreation can be found in test case attached with patch.
Comment 3 Tom Ware CLA 2011-09-08 15:17:48 EDT
Created attachment 203020 [details]
Proposed fix trunk and 2.3.x

Trunk and 2.0.3 have already solved the initial problem, but have some other code that potentially causes the same issue when using a returning policy.
Comment 4 Tom Ware CLA 2011-09-09 10:05:59 EDT
Checked changes into 2.1.4 - review still pending (Andrei Ilitchev, James Sutherland)
Comment 5 Tom Ware CLA 2011-09-09 13:13:32 EDT
Fixes are slightly different for 2.1/2.2 and trunk/2.3

Both changes check to ensure a changeSet is not new before adding extra records to it.

In 2.1/2.2 we fix this for sequencing and optimistic locking

In trunk/2.3 the above items are already addressed, but we add some changes for returning policy.

Reviewed by Andrei Ilitchev

Added test to relationships model

Tested with JPA LRG and Returning model tests
Comment 6 Tom Ware CLA 2011-09-13 16:16:53 EDT
Created attachment 203299 [details]
some additional changes
Comment 7 Tom Ware CLA 2011-09-14 10:27:09 EDT
Additional changes checked in. - all checked in to 2.3 and trunk, only test changes and DescriptorEvent changes checked into 2.1 and 2.2
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:15:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 9 Eclipse Webmaster CLA 2022-06-09 10:33:42 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink