Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent REST Calls creates optimistic locking errors in UserSessionTokenStore #104

Closed
mmacfadden opened this issue Apr 30, 2020 · 0 comments
Assignees
Labels
bug Something isn't working server Issues related to the server
Milestone

Comments

@mmacfadden
Copy link
Contributor

Versions

  • Convergence Version: 1.0.0-rc.5

Describe the Bug
When multiple REST calls are hitting a distirbuted instance of convergence with a distributed orient db we are getting concurrent update errors like this:

Suppressed: com.orientechnologies.orient.core.exception.OConcurrentModificationException: Cannot UPDATE the record #27:1 because the version is not the latest. Probably you are updating an old record or it has been modified by another user (db=v28 your=v27)
server_1         | 	DB name="convergence"
server_1         | 	Error Code="3"
server_1         | 		at com.orientechnologies.orient.server.distributed.impl.ONewDistributedTransactionManager.handleResponse(ONewDistributedTransactionManager.java:257) ~[?:?]
server_1         | 		at com.orientechnologies.orient.server.distributed.impl.ONewDistributedTransactionManager.retriedCommit(ONewDistributedTransactionManager.java:204) ~[?:?]
server_1         | 		at com.orientechnologies.orient.server.distributed.impl.ONewDistributedTransactionManager.commit(ONewDistributedTransactionManager.java:84) ~[?:?]
server_1         | 		at com.orientechnologies.orient.server.distributed.impl.ODatabaseDocumentDistributed.internalCommit(ODatabaseDocumentDistributed.java:346) ~[?:?]
server_1         | 		at com.orientechnologies.orient.core.storage.impl.local.OMicroTransaction.doCommit(OMicroTransaction.java:363) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.storage.impl.local.OMicroTransaction.commit(OMicroTransaction.java:166) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.endMicroTransaction(ODatabaseDocumentEmbedded.java:798) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.executeSaveRecord(ODatabaseDocumentEmbedded.java:788) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:184) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.saveInternal(ODatabaseDocumentAbstract.java:2077) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.save(ODatabaseDocumentAbstract.java:2039) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.save(ODatabaseDocumentAbstract.java:1929) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.save(ODatabaseDocumentAbstract.java:86) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.server.OConnectionBinaryExecutor.executeUpdateRecord(OConnectionBinaryExecutor.java:439) ~[com.orientechnologies.orientdb-server-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.client.remote.message.OUpdateRecordRequest.execute(OUpdateRecordRequest.java:133) ~[com.orientechnologies.orientdb-client-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:310) ~[com.orientechnologies.orientdb-server-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:212) ~[com.orientechnologies.orientdb-server-3.0.30.jar:3.0.30]
server_1         | 		at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:69) ~[com.orientechnologies.orientdb-core-3.0.30.jar:3.0.30]

This is because we are loading and saving databas objects rather than using update queires.

@mmacfadden mmacfadden added bug Something isn't working server Issues related to the server labels Apr 30, 2020
@mmacfadden mmacfadden added this to the 1.0.0-rc.6 milestone Apr 30, 2020
@mmacfadden mmacfadden self-assigned this Apr 30, 2020
@mmacfadden mmacfadden changed the title Concurrent REST Calls creates optimistic locking errors in authentication actor. Concurrent REST Calls creates optimistic locking errors in UserSessionTokenStore Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Issues related to the server
Projects
None yet
Development

No branches or pull requests

1 participant