Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341469

Summary: Make CDOMergingConflictResolver stable
Product: [Modeling] EMF Reporter: Sebastian Paul <sebastian.paul.ext>
Component: cdo.coreAssignee: Pascal Lehmann <pascal.lehmann>
Status: CLOSED DUPLICATE QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: cbateman, esteban.dugueperoux, lothar, pascal.lehmann, rkrijgsheld, saulius.tvarijonas, sebastian.paul.ext
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://www.eclipse.org/forums/index.php?t=msg&goto=662413&S=fbfb18431274b7ac9769a752ffb34bc4
Whiteboard:
Bug Depends on: 342944    
Bug Blocks:    
Attachments:
Description Flags
new test model
none
Testcases none

Description Sebastian Paul CLA 2011-03-31 08:20:11 EDT
Build Identifier: 4.0.0.v20110322-2033

The CDOMergingConflictResolver is still under development, but MergeLocalChangesPerFeature is already marked as deprecated and shows different behaviour than in CDO 3.0.

This is just a reminder:
"It was supposed to be operational already, when we found out that there's a severe issue with applying the produced deltas to the local transaction. That's why MergeLocalChangesPerFeature is also already marked deprecated. But you should still be able to use MergeLocalChangesPerFeature. I'm currently on vacation and can not find the bug that you would cc yourself on in order to get notified about status changes. You could file a new one to remind me."

Reproducible: Always
Comment 1 Eike Stepper CLA 2011-04-12 04:15:34 EDT
Hmm, the tests that we have for the CDOMergingConflictResolver all pass, but there are not many of them. Pascal is currently working on a higher-coverage suite for conflict resolvers. That said, I'm not sure if the original cause for the deprecation has already been fixed (perhaps in bug 335773?).

Sebastian, have you hit a particular bug in CDOMergingConflictResolver? 

Or is your problem more that DefaultCDOMerger.PerFeature.ManyValued is not an identical substitute for MergeLocalChangesPerFeature?
Comment 2 Pascal Lehmann CLA 2011-04-13 03:22:57 EDT
Created attachment 193121 [details]
new test model
Comment 3 Pascal Lehmann CLA 2011-04-13 03:26:52 EDT
Created attachment 193122 [details]
Testcases

I converted a couple of testcases from our testsuite. Please note that some are quite specific to the ConflictResolver we use and might not make sense for the MergingConflictResolver or probably need some adjustment.
Comment 4 Eike Stepper CLA 2011-04-13 09:54:39 EDT
Hi Pascal,

Thank you, that looks like a very broad and good base. I've made some minor changes to the new test model and reduced the size of the test class by 50%. And I'm now using the commitAndSync() test helper method, which makes the various sleeps unnecessary. Now it seems that ~60 out of 81 tests are failing. Let's chat about that when you're available again. I hope it's okay that I committed the new project together with the new test framework/logic code?

Committed revision 7615
Comment 5 Eike Stepper CLA 2011-04-13 10:33:10 EDT
Forgot to commit the test model.

Committed revision 7616
Comment 6 Eike Stepper CLA 2011-04-13 11:58:01 EDT
(In reply to comment #4)
> Now it seems that ~60 out of 81 tests are failing. 

Correction: 51 out of 81 ;-)
Comment 7 Eike Stepper CLA 2011-04-15 06:26:50 EDT
Handing over to Pascal...
Comment 8 Eike Stepper CLA 2011-06-02 04:52:55 EDT
Reducing severity to normal because there's the alternative to use the traditional conflict resolvers.
Comment 9 Ronald Krijgsheld CLA 2012-02-06 05:41:39 EST
At the moment we are receiving ArrayIndexOutOfBounds when a remove delta is applied.

I have found (I think) two problems with the current implementation of the CDOMergingConflictResolver.

1. The ordering in which the RemoteAggragator receives the commit infos is not deterministic, because there is no synchronization from the invalidateOrdererd() onward.

2. the scope of an invalidate is one remote commit. The scope of the RemoteAggregator is the local commit/rollback. 

Could you please take a look?
Comment 10 Eike Stepper CLA 2012-06-05 07:28:42 EDT
Moving all open bug reports to 4.1 because the release is very near and it's hghly unlikely that there will be spare time to address 4.0 problems.

Please make sure that your patches can be applied against the master branch and that your problem is not already fixed there!!!
Comment 11 Eike Stepper CLA 2012-08-14 22:57:16 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 12 Eike Stepper CLA 2013-06-29 12:18:38 EDT
We'll try to address open problems in 4.3 (master) first and then port fixes back to 4.2.
Comment 13 Eike Stepper CLA 2013-09-01 05:32:09 EDT
I've committed most of the needed changes in the context of bug 396804, so I'll close this as a dup even if it's older and with more discussion. Sorry ;-)

*** This bug has been marked as a duplicate of bug 396804 ***
Comment 14 Eike Stepper CLA 2020-12-11 10:27:36 EST
Closing.
Comment 15 Eike Stepper CLA 2020-12-11 10:32:39 EST
Closing.