Invalid TX counter value when deleting vertices with orientdb 2.1.x

When removing vertices from a class with more than 1,600,000 instances using the console:

delete vertex program batch 5000

      

I ran into this error:

com.orientechnologies.orient.core.exception.OStorageException: Invalid value of TX counter
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.rollback(OTransactionOptimistic.java:175)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2595)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.close(ODatabaseDocumentTx.java:1137)
    at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:107)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:180)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:627)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

      

I am not running inside a transaction and I was able to reproduce the error using plocal and remote connection, with enterprise v2.1.4. The database was created with a different server instance but with the same major version (2.1.x).

Update

My database is really huge (~ 29G), but I was able to reproduce the problem with a smaller graph and start the console with a small heap (-Xmx32M).

OrientGraphFactory factory = ...

OrientBaseGraph graph = factory.getTx();

graph.createVertexType("Program");
graph.createVertexType("Variable");

graph.getRawGraph().getLocalCache().setEnable(false);
graph.declareIntent(new OIntentMassiveInsert());

try {                       
    Vertex vr = graph.addVertex("class:Program");

    for (int i = 0; i < 20000; i++) {               
        Vertex v;

        v = graph.addVertex("class:Variable");              
        graph.addEdge(null, v, vr, "has");              
    }
} finally {
   graph.shutdown();
}

      

Update 2

With enterprise-oriented 2.1.5, the error is slightly different. I was working with a remote connection (because I was unable to set up logging on the client console) and with the same memory limit (-Xmx32M):

2015-11-02 11:50:49:936 FINE  {db=db1} Deleted record #13:468 v.2 [OLocalPaginatedStorage]{db=db1} Error on transaction commit
com.orientechnologies.orient.core.exception.OTransactionException: Transaction was committed more times than it is started.
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:160)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2653)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2622)
    at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:161)
    at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex.end(OCommandExecutorSQLDeleteVertex.java:279)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:437)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:90)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:1538)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1519)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:72)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
    at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex$2.call(OCommandExecutorSQLDeleteVertex.java:212)
    at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex$2.call(OCommandExecutorSQLDeleteVertex.java:207)
    at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInTx(OGraphCommandExecutorSQLFactory.java:130)
    at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex.execute(OCommandExecutorSQLDeleteVertex.java:207)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:90)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:1538)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1519)
    at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1319)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:396)
    at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:223)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2015-11-02 11:50:54:101 FINE  {db=db1} Sent run-time exception to the client /127.0.0.1:37943: com.orientechnologies.orient.core.exception.OStorageException: Invalid value of TX counter [ONetworkProtocolBinary]

      

+3
java orientdb


source to share


No one has answered this question yet

Check out similar questions:

432
"Invalid signature file" when trying to run .jar
2
Multiple inheritance in orientdb vertex classes?
2
orientDB vertices and boundary relations
2
OrientDB: UPDATE Adjacent Vertices
2
Related to Vertex request in OrientDB
1
Orientdb - adding a formula to a vertex (node)
1
OrientDB Find vertex linked to another vertex list
0
OrientDB 2.1 on Azure
0
Vertex inheritance in OrientDB
0
Alternative to getVertexByKey in OrientDB 2.1



All Articles