Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332671 - Timeout in LoadMergeDataRequest
Summary: Timeout in LoadMergeDataRequest
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 14:00 EST by Lothar Werzinger CLA
Modified: 2011-06-23 03:42 EDT (History)
2 users (show)

See Also:


Attachments
Patch v1 (30.83 KB, patch)
2010-12-18 11:36 EST, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lothar Werzinger CLA 2010-12-15 14:00:53 EST
Build Identifier: 

I am trying to do a merge on branches (with a fake merger that does actually not even do anything) and I get a TimeoutException:

org.eclipse.emf.cdo.common.util.TransportException: java.util.concurrent.TimeoutException
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:405)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.loadMergeData(CDOClientProtocol.java:359)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.merge(CDOTransactionImpl.java:422)

Setting a hight timeout value helped (temporarily)

((org.eclipse.emf.cdo.net4j.CDOSession) transaction.getSession())
          .options().getProtocol().setTimeout(1000 * 600);


Here's my sample code snippet:

class FakeMerger
  implements
    CDOMerger
{
  public CDOChangeSet target;
  public CDOChangeSet source;

  @Override
  public CDOChangeSetData merge(CDOChangeSet target, CDOChangeSet source)
  {
    this.target = target;
    this.source = source;
    
    // return null, and therefore do NOT do an actual merge
    return null;
  }
};
FakeMerger fakemerger = new FakeMerger();

CDOTransaction mergetransaction =
  transaction.getSession().openTransaction(testbranch);
mergetransaction.merge(mainbranch.getHead(), fakemerger);


Reproducible: Always

Steps to Reproduce:
1. run the above code.
Comment 1 Eike Stepper CLA 2010-12-18 11:35:27 EST
Among other things I added progress monitoring to IStoreAccessor.readChangeSet().

*Ibe:*

I had to change two of your classes. Please review my changes in:

ObjyBranch.java
ObjectivityStoreAccessor.java
Comment 2 Eike Stepper CLA 2010-12-18 11:36:17 EST
Created attachment 185478 [details]
Patch v1

Lothar, please test this patch and tell me if it works for you.
Comment 3 Eike Stepper CLA 2010-12-18 14:46:33 EST
Committed to HEAD
Comment 4 Eike Stepper CLA 2011-06-23 03:42:33 EDT
Available in R20110608-1407