单线程中的OConcurrentModificationException

时间:2016-06-07 12:12:22

标签: orientdb

即使在禁用本地缓存后,我们也会在单线程环境中获得OConcurrentModificationException。

ODatabaseDocumentTx conn = new ODatabaseDocumentTx("");                 。conn.getLocalCache()setEnable(假);

问题不一致所以我们无法继续,下面是上述Exception的日志跟踪。它发生在UPDATE和DELETE操作中。

com.orientechnologies.orient.core.exception.OConcurrentModificationException:无法删除记录#35:214,因为版本不是最新版本。您可能正在删除旧记录或已被其他用户修改(db = v11 your = v10)     在com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doDeleteRecord(OAbstractPaginatedStorage.java:1672)~ [orientdb-core.jar:2.1-rc3]     at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.deleteRecord(OAbstractPaginatedStorage.java:773)~ [orientdb-core.jar:2.1-rc3]     at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commitEntry(OAbstractPaginatedStorage.java:2053)~ [orientdb-core.jar:2.1-rc3]     在com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:925)~ [orientdb-core.jar:2.1-rc3]     在com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:590)〜[orientdb-core.jar:2.1-rc3]     在com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:149)〜[orientdb-core.jar:2.1-rc3]     在com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:129)〜[orientdb-core.jar:2.1-rc3]

1 个答案:

答案 0 :(得分:0)

您的代码中的原因: Dictionary<int, Dictionary<int, Dictionary<string, string>>>从不这样做))。