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

Bug 349793

Summary: New transaction waits for different update, than asked
Product: [Modeling] EMF Reporter: Egidijus Vaisnora <vaisegid>
Component: cdo.coreAssignee: Egidijus Vaisnora <vaisegid>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: caspar_d, saulius.tvarijonas
Version: 4.1Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Test and fix v1
none
Patch v2 none

Description Egidijus Vaisnora CLA 2011-06-20 05:05:39 EDT
If transaction was created at the time, when invalidation was running and this transactions calls waitForUpdate for already invalidating commit - it will wait for the next invalidation actions. If only single user is working, then simply deadlocks on waitForUpdate call.
Comment 1 Egidijus Vaisnora CLA 2011-06-20 05:18:18 EDT
Created attachment 198242 [details]
Test and fix v1

Assigning transaction last update time the same value as session has
Comment 2 Caspar D. CLA 2011-06-20 06:05:38 EDT
[NoMagic note: SVR-3225]
Comment 3 Eike Stepper CLA 2011-07-02 04:41:47 EDT
Changing to 4.1 to ensure that the fix will "last". Please clone this bugzilla to 4.0 if you want a maintenance fix, too.
Comment 4 Eike Stepper CLA 2011-07-02 04:44:19 EDT
With your patch I'm seeing an error in org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF:

    "Version must be increased to 4.0.100"
    
An indication that you're not using our special version checker tool. Please export org.eclipse.emf.cdo.releng.version-feature to your host IDE's installation folder and do a clean build.
Comment 5 Eike Stepper CLA 2011-07-02 05:58:19 EDT
Your fix is good! The test however would, in case of a regression, hang (also on Hudson). I changed the logic to:

   freshTransaction.waitForUpdate(timestamp, DEFAULT_TIMEOUT);
Comment 6 Eike Stepper CLA 2011-07-02 05:58:57 EDT
Created attachment 198996 [details]
Patch v2
Comment 7 Eike Stepper CLA 2011-07-02 05:59:38 EDT
Please commit to *trunk*
Comment 8 Egidijus Vaisnora CLA 2011-07-02 06:12:02 EDT
Fixed in trunk, revision 8575
Comment 9 Eike Stepper CLA 2012-09-21 07:17:14 EDT
Closing.