Orient 2.2.29 的多线程删除和重新插入失败

Multithreaded deletion and re-insertion fails with Orient 2.2.29

我正在使用多个线程删除不同的记录并将其重新插入同一个 OrientDB(使用不同的图形实例),但我遇到了很多异常。我在弄清楚它时遇到了一些麻烦,而且我还没有在 SO 上发现完全像这样的问题。当删除和重新插入按顺序完成时,一切都很好。我已经检查以确保 IdGraph 对象中的基本图不同,并且我的交易 出现 没问题,但现在我不太确定。 FWIW,这是我的 JVM 设置

-Dfile.encoding=UTF-8 -Xss512K -Xmx2G -XX:MaxDirectMemorySize=1G -Dstorage.useWAL=false

看起来一条记录被误读并导致 NullPointerExceptionDELETE VERTEX 命令期间。这是异常堆栈的一部分。我正在删除基于其 n:station 属性 的所有顶点。 n:station 属性 转换为 n_3astation 因此 属性 键包含有效字符。然后我将 DELETE VERTEX V WHERE n_3astation IN ["station_4681"] 传递给 Orient。 Orient 方面有一些委托,以确保删除这些顶点及其边缘。我尝试单步执行代码,但在委托中迷路了,所以我无法找到问题所在。

WARNING [09:28:11 02-Apr-18 EDT][com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary] $ANSI{green {db=systemDb}} Error deserializing record with id #9:0 send this data for debugging: QfFN5B5DdH6DCF54BQo6IV8zYWlkAAABJwcebl8zYWRpc3BsYXlOYW1lAAABYQcUZ2VvXzNhY2l0eQAAAXIHHGdlb18zYWJ1aWxkaW5nAAABewcWbl8zYXN0YXRpb24AAAGIBxBuXzNhdHlwZQAAAZUHFmdlb18zYXN0YXRlAAABrgcgbl8zYW9yZEluU2Vzc2lvbgAAAbcHEG5fM2FuYW1lAAAB8QcYbl8zYXNjaGVkdWxlAAACAgAQVGFnVHlwZXMAAAIDBxhDYXRlZ29yeU1hc2sAAAILBxppbl9zY29wZWRFZGdlAAACDRYAcm5zcGFjZTpzdGF0aW9uXzQ2NTh8c2xvdDovU2NoZWR1bGVGb2xkZXIvVHJpZ2dlclNjaGVkdWxlNHJuc3BhY2U6c3RhdGlvbl80NjU4fHNsb3Q6L1NjaGVkdWxlRm9sZGVyL1RyaWdnZXJTY2hlZHVsZTQgVHJpZ2dlclNjaGVkdWxlNBBSaWNobW9uZBhzdGF0aW9uXzQ2NTgYc3RhdGlvbl80NjU4MHNjaGVkdWxlOlRyaWdnZXJTY2hlZHVsZRBWaXJnaW5pYXJuc3BhY2U6c3RhdGlvbl80NjU4fHNsb3Q6L1NjaGVkdWxlRm9sZGVyL1RyaWdnZXJTY2hlZHVsZTQgVHJpZ2dlclNjaGVkdWxlNAEOaHM6aWQ9bwIxAQAAAAEACQAAAAAAAAGE
SEVERE [09:28:11 02-Apr-18 EDT][com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage] $ANSI{green {db=systemDb}} Exception `59ED03EC` in storage `systemDb`
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select from `V`  WHERE n_3astation IN ["station_4681"]
        DB name="systemDb"
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3361)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3278)
        at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
        at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
        at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
        at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex.call(OCommandExecutorSQLDeleteVertex.java:215)
        at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex.call(OCommandExecutorSQLDeleteVertex.java:208)
        at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInTx(OGraphCommandExecutorSQLFactory.java:172)
        at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInConfiguredTxMode(OGraphCommandExecutorSQLFactory.java:257)
        at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex.execute(OCommandExecutorSQLDeleteVertex.java:208)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3340)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3278)
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
        at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:49)
        at executeQuery(OrientSystemDbConnection.java:502)

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 58050422
        at java.lang.String.checkBounds(String.java:385)
        at java.lang.String.<init>(String.java:425)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.stringFromBytes(ORecordSerializerBinaryV0.java:992)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.readString(ORecordSerializerBinaryV0.java:949)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.deserializeValue(ORecordSerializerBinaryV0.java:408)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.deserializePartial(ORecordSerializerBinaryV0.java:148)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.fromStream(ORecordSerializerBinary.java:78)
        at com.orientechnologies.orient.core.record.impl.ODocument.deserializeFields(ODocument.java:1854)
        at com.orientechnologies.orient.core.sql.filter.OSQLFilterItemField.getValue(OSQLFilterItemField.java:126)
        at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:379)
        at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:88)
        at com.orientechnologies.orient.core.sql.filter.OSQLFilter.evaluate(OSQLFilter.java:105)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.evaluateRecord(OCommandExecutorSQLResultsetAbstract.java:422)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.filter(OCommandExecutorSQLResultsetAbstract.java:412)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearchRecord(OCommandExecutorSQLSelect.java:609)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.serialIterator(OCommandExecutorSQLSelect.java:1642)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.fetchFromTarget(OCommandExecutorSQLSelect.java:1589)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:522)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:485)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3340)
        ... 27 more

更新

从线程转储中获取一些信息后,在加密数据库时使用并发似乎存在问题。虽然没有死锁,但我可以在 OrientDB 上的数据库加密关闭时同时更新。以下是其中一个被阻止线程中的堆栈跟踪的一部分。

这是否意味着我不能在 Orient 加密时使用并发?

原来这是 Orient 中的一个错误,已在版本 2.2.34 中得到解决

https://github.com/orientechnologies/orientdb/issues/8201