[CDO] CDOSession Concurreny Problems [message #1744518] |
Tue, 27 September 2016 16:08 |
Daniel Seybold 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 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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03625 seconds