Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342632 - Duplicate CascadeLockingPolicy instances added to private owned child
Summary: Duplicate CascadeLockingPolicy instances added to private owned child
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 16:03 EDT by David Minsky CLA
Modified: 2022-06-09 10:25 EDT (History)
0 users

See Also:


Attachments
Proposed fix, and testcase (11.12 KB, patch)
2011-04-12 16:15 EDT, David Minsky CLA
no flags Details | Diff
Proposed fix, and testcase - refactored (10.60 KB, patch)
2011-04-13 14:28 EDT, David Minsky CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Minsky CLA 2011-04-12 16:03:08 EDT
Problem description:

- Two descriptors ("A" & "B") reference a third child descriptor ("C")(privately owned), with cascade locking (& version locking)
- Child descriptor ("C") references another descriptor ("D") (privately owned)
- Depending on the order of descriptor initialization, descriptor D can contain 2 duplicate cascade locking policy instances, because both A and B reference its parent C
- This increases SQL traffic to the DB, as duplicate lookups are performed when changes are detected for D
- D should only have one cascade locking policy to minimize SQL calls
Comment 1 David Minsky CLA 2011-04-12 16:15:17 EDT
Created attachment 193091 [details]
Proposed fix, and testcase
Comment 2 David Minsky CLA 2011-04-13 14:28:46 EDT
Created attachment 193183 [details]
Proposed fix, and testcase - refactored
Comment 3 David Minsky CLA 2011-04-13 16:46:56 EDT
Reviewed: Andrei Ilitchev
Checked into trunk (2.3) at revision: 9230
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:25:02 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink