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

OResponseProcessingException while simultaneous Db querying #2141

Closed
ayesyev opened this issue Mar 18, 2014 · 7 comments
Closed

OResponseProcessingException while simultaneous Db querying #2141

ayesyev opened this issue Mar 18, 2014 · 7 comments
Assignees
Milestone

Comments

@ayesyev
Copy link

ayesyev commented Mar 18, 2014

Issuing simultaneous queries to DB that contains TRAVERSE, can cause OResponseProcessingException.

Query example:

select count(*) from (traverse both(RELATED) from #21:7 while $depth < 2 ) where @class='IPAddress' and @rid <> #21:7

Stacktrace:

    com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing.
    at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:264)
    at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:231)
    at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:202)
    at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:113)
    at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1951)
    at com.orientechnologies.orient.client.remote.OStorageRemote.command(OStorageRemote.java:982)
    at com.orientechnologies.orient.client.remote.OStorageRemoteThread.command(OStorageRemoteThread.java:431)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:69)
    at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:82)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:29)
    at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:28)
    at com.ibm.forensics.controllers.EpController.queryRelations(EpController.java:83)
   ...

    Caused by: com.orientechnologies.orient.core.exception.OTransactionException: Invalid state of the transaction. The transaction must be begun.
    at com.orientechnologies.orient.core.tx.OTransactionRealAbstract.checkTransaction(OTransactionRealAbstract.java:342)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.addRecord(OTransactionOptimistic.java:314)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.loadRecord(OTransactionOptimistic.java:291)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:203)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:39)
    at com.orientechnologies.orient.core.id.ORecordId.getRecord(ORecordId.java:296)
    at com.tinkerpop.blueprints.impls.orient.OrientVertexIterator.createWrapper(OrientVertexIterator.java:31)
    at com.tinkerpop.blueprints.impls.orient.OrientVertexIterator.createWrapper(OrientVertexIterator.java:13)
    at com.orientechnologies.orient.core.iterator.OLazyWrapperIterator.hasNext(OLazyWrapperIterator.java:75)
    at com.orientechnologies.common.collection.OMultiCollectionIterator.hasNext(OMultiCollectionIterator.java:74)
    at com.orientechnologies.orient.core.command.traverse.OTraverseMultiValueDepthFirstProcess.process(OTraverseMultiValueDepthFirstProcess.java:33)
    at com.orientechnologies.orient.core.command.traverse.OTraverseMultiValueDepthFirstProcess.process(OTraverseMultiValueDepthFirstProcess.java:24)
    at com.orientechnologies.orient.core.command.traverse.OTraverseFieldProcess.process(OTraverseFieldProcess.java:66)
    at com.orientechnologies.orient.core.command.traverse.OTraverseFieldProcess.process(OTraverseFieldProcess.java:25)
    at com.orientechnologies.orient.core.command.traverse.OTraverse.next(OTraverse.java:101)
    at com.orientechnologies.orient.core.command.traverse.OTraverse.hasNext(OTraverse.java:71)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLTraverse.hasNext(OCommandExecutorSQLTraverse.java:163)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:343)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:313)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:57)
    at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:96)
    at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:85)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:69)
    at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:82)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:29)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1320)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:330)
    at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:125)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45)
@enisher
Copy link
Contributor

enisher commented Mar 18, 2014

What do you mean by simultaneous? Do threads use the same instance of Graph to execute queries? I mean, the same java object instance.

@ayesyev
Copy link
Author

ayesyev commented Mar 18, 2014

No, each thread uses it's own connection (OrientGraph instance) acquired from OrientGraphFactory.

@enisher
Copy link
Contributor

enisher commented Mar 18, 2014

Got it. Could you provide a test case to reproduce an issue?

@enisher enisher added this to the 1.7rc2 milestone Mar 18, 2014
@enisher enisher self-assigned this Mar 18, 2014
@ayesyev
Copy link
Author

ayesyev commented Mar 18, 2014

I'm working on it. I will also provide DB for this test case.

@ayesyev
Copy link
Author

ayesyev commented Mar 18, 2014

DB https://www.dropbox.com/s/k6jlkr6qd0spld2/ePersona.zip
JUnit test https://www.dropbox.com/s/oayx4pgz714pv9o/SimultCrashTest.java
I'm using com.orientechnologies:orientdb-graphdb:1.7-rc2-SNAPSHOT from Maven

@lvca lvca modified the milestones: 1.7, 1.7rc2 Mar 20, 2014
@enisher
Copy link
Contributor

enisher commented Mar 25, 2014

@ayesyev it is partially fixed in current snapshot.

However there is still some issues in complex cases, so I'll keep the issue open until fix them.

@enisher
Copy link
Contributor

enisher commented Mar 26, 2014

Fixed in 1.7-rc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants