| Summary: | Illegal deltas are produced on compare | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Egidijus Vaisnora <vaisegid> | ||||||||||||||||
| Component: | cdo.core | Assignee: | Egidijus Vaisnora <vaisegid> | ||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||||||||||
| Severity: | normal | ||||||||||||||||||
| Priority: | P3 | CC: | caspar_d, cbateman, saulius.tvarijonas, stefan, szbardy | ||||||||||||||||
| Version: | 4.0 | Flags: | vaisegid:
review?
(stepper) stepper: review+ |
||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||
| Hardware: | All | ||||||||||||||||||
| OS: | All | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
Egidijus Vaisnora
Created attachment 189296 [details]
test case
The solution appears straightforward at first... the comparison logic should refuse to compare elements that are instances of CDOElementProxy. But the trouble is that the comparison logic is in emf.cdo.common while CDOElementProxy is in emf.cdo. So the comparison logic cannot recognize CDOElementProxies, unless... ... we move CDOElementProxy to emf.cdo.common. Which isn't unreasonable because CDOElementProxy is really only used in CDORevisions, which are also in emf.cdo.common. But the complication is that CDOElementProxy depends on CDOSession... which is in emf.cdo and should stay there (I think). And surely we don't want emf.cdo.common to depend on emf.cdo. A nice case of entangled dependencies... any ideas anyone? Created attachment 191812 [details]
Patch v1
Moved various classes from emf.cdo to emf.cdo.common:
- CDOElementProxy
- CDOElementProxyImpl
- CDOListWithElementProxiesImpl
Added proxy detection in the compare logic.
This doesn't really fix the bug yet, but at least properly
detects the problem.
Created attachment 191969 [details]
Patch v2
Created attachment 191976 [details]
Patch v3
CDOElementProxy does not seem to exist anymore. Please fix the patch... Perhapüs a crash corrupted my workspace. Trying again... No, the ptahc removes CDOElementProxy but leaves some classes referring to it. Now this *is* a problem with SVN. If you move classes (as I did with the CDOElementProxy* stuff), svn diff doesn't include their addition in its output. I'll work around this by doing a delete-and-add (as opposed to a move) for generating the patch. For the real commit, I'll do a move (so that the history of the files won't be lost). Btw.. it seems this shortcoming of 'svn diff' will be addressed in Subversion 1.7. Created attachment 192516 [details]
Patch v4
Created attachment 192519 [details]
Patch v5
Committed revision 7588. Available in R20110608-1407 The committed solution does not fix the reported problem. I've disabled org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_337587_Test._testRevisionCompare() meanwhile. Created attachment 208490 [details]
Fixed test case
As per skype conversation with Eike agreed, test do not identifies provided fix. Fixed test case to match fix.
Thank you! commit 65d10b1e3f523b1139289c9aa70208ce57779ab4 *** Bug 369646 has been marked as a duplicate of this bug. *** Closing. |