使用orientdb 2.1.x删除顶点时,TX计数器的值无效

时间:2015-10-26 12:40:30

标签: java orientdb

使用控制台从超过1600000个实例的类中删除顶点时:

delete vertex program batch 5000

我遇到这个错误:

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)

我没有在事务中运行,我能够使用企业版v2.1.4重现本地和远程连接的错误。 数据库是使用另一个服务器实例创建的,但具有相同的主要版本(2.1.x)。

更新

我的数据库非常庞大(~29G),但我设法用较小的图表重现了这个问题,并用一个小堆(-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();
}

更新2

对于orient enterprise 2.1.5,错误有点不同。我使用远程连接运行(因为我无法在客户端控制台中配置日志记录)并且具有相同的内存限制(-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]

0 个答案:

没有答案