我使用多个线程删除并重新插入不同的记录到同一个OrientDB(使用不同的图形实例)但我得到了很多例外。我在搞清楚方面遇到了一些麻烦,而且我还没有找到与此完全相同的问题。删除和重新插入按顺序完成后,一切都很好。我已经检查过以确保IdGraph对象中的基本图形不同,并且我有出现的事务没问题,但现在我不太确定。 FWIW,这是我的JVM设置
-Dfile.encoding=UTF-8 -Xss512K -Xmx2G -XX:MaxDirectMemorySize=1G -Dstorage.useWAL=false
在NullPointerException
命令期间,记录看起来像是误读并导致DELETE VERTEX
。这是Exception堆栈的一部分。我将根据其n:station
属性删除所有顶点。 n:station
属性将转换为n_3astation
,因此属性键包含有效字符。然后我将DELETE VERTEX V WHERE n_3astation IN ["station_4681"]
传递给东方。在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$2.call(OCommandExecutorSQLDeleteVertex.java:215)
at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex$2.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上的DB加密时同时更新。下面是其中一个被阻塞线程中的堆栈跟踪的一部分。
这是否意味着当Orient加密时我不能使用并发性?
答案 0 :(得分:0)
这是东方的一个错误,已在2.2.34版本中解决