Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] CDOSession Concurreny Problems
[CDO] CDOSession Concurreny Problems [message #1744518] Tue, 27 September 2016 16:08 Go to next message
Daniel Seybold is currently offline Daniel SeyboldFriend
Messages: 14
Registered: October 2014
Junior Member
Dear EMF/CDO community,

we are using one CDO server as central repository. The server is programmatically accessed by multiple clients.

For each client a separate user (with different read/write privileges) is defiend, i.e. each clients has its own Session.
All access the same repository.

After some runtime we face a strange concurrency problem:

org.eclipse.emf.cdo.util.CommitConflictException: Attempt by Transaction[253:102] to modify historical revision: CDORevisionDelta[ELEMENT_H@OID1555725:0v270 --> [CDOFeatureDelta[ELEMENT_V, LIST, originSize=6, list=[CDOFeatureDelta[ELEMENT_V, ADD, value=OID3902109, index=6]]]]] 


We have been able to reduce the number of occurrences by closing some transaction leaks, but they still appear and they are reproducible. In case the aforementioned error occurs, our system will not recover.
Find below another error example:

org.eclipse.emf.cdo.util.CommitConflictException: Attempt by Transaction[253:235] to modify historical revision: CDORevisionDelta[ELEMENT_H@OID1555725:0v270 --> [CDOFeatureDelta[ELEMENT_V, LIST, originSize=6, list=[CDOFeatureDelta[ELEMENT_V, ADD, value=OID3902660, index=6]]]]] 


It seems that one of our clients could not access the current version of the model in the CDO Server. The CDO Browser shows for the first error v271 and for the second v275.

We tried
CDOSession.refresh()
but this had no effect.

All transactions are new and use the same session, like shown below:

 final CDOTransaction cdoCon = cdoSession.createTransaction();
         try {
             long id = cdoCon.getSession().refresh();
             logger.info("session refresh returned: " + id);
             ELEMENT_V ev = (ELEMENT_V) cdoCon.getObject(evCdoId);
             ELEMENT_CN ecn= (ELEMENT_CN) cdoCon.getObject(cmpCdoId);
             if(ecn!= null) {
                 logger.info("setting ELEMENT_H to " + ecn.getId());
                 ev.setELEMENT_H(ecn.getELEMENT_H());
                 nodeId = ecn.getId();
             } else {
                 logger.info("ELEMENT_H cannot be set");
             }
             evId = ev.getId();           
             cdoSession.commitAndCloseConnection(cdoCon);
         } catch (CommitException e) {
             printFailedTransaction(cdoCon);
             cdoCon.rollback();
             printFailedTransaction(cdoCon);
             logger.log(Level.WARNING, "cannot commit state", e);
             throw e;
         } finally {
             cdoSession.closeConnection(cdoCon);
         }


Is there any chance to reload/refresh the Session with closing and reopening the complete session?

Thanks in advance for any help!

Cheers,
Daniel
Re: [CDO] CDOSession Concurreny Problems [message #1745140 is a reply to message #1744518] Wed, 05 October 2016 15:24 Go to previous messageGo to next message
Per Sterner is currently offline Per SternerFriend
Messages: 91
Registered: October 2011
Member
- Which CDO-Version are you using?
- How is CDO configured?

1.
Is data modified concurrently? Perhaps the exception is correct?

2.
We are using an older CDO-Version: 4.3. Here it is indeed possible, that such an exception may occur. If the CDOSession is opened, something may go wrong and the "reorderQueue" of the "invalidator" may grow. If this happens, no new changes appear in the current session and views.
But if the Session is opened correctly (the "reorderQueue" isn't growing), I have only seen this correct exception with concurrent modifications.
Re: [CDO] CDOSession Concurreny Problems [message #1745141 is a reply to message #1745140] Wed, 05 October 2016 16:05 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
I suspect that the problem is fixed in CDO 4.5 via:

472924: Problems with explicit locking and high-frequency session open/close
https://bugs.eclipse.org/bugs/show_bug.cgi?id=472924


Re: [CDO] CDOSession Concurreny Problems [message #1745267 is a reply to message #1745141] Fri, 07 October 2016 07:04 Go to previous message
Daniel Seybold is currently offline Daniel SeyboldFriend
Messages: 14
Registered: October 2014
Junior Member
Dear Eike,

thanks for this pointer.

This could indeed solve our issues as we are running CDO 4.4.

We will now upgrade our system to CDO 4.5 and verify if the concurrency issues are resolved.

Thanks a lot,
Daniel
Previous Topic:[Teneo] Containment Reference to Abstract Class with TABLE_PER_CLASS
Next Topic:Load model by DOM Node
Goto Forum:
  


Current Time: Thu Apr 25 21:35:03 GMT 2024

Powered by FUDForum. Page generated in 0.05518 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top