简体   繁体   English

分布式中的OrientDB不断获取ConcurrentModificationException

[英]OrientDB in distributed keeps getting ConcurrentModificationException

I'm using orientdb community edition 2.2.9 with pyorient's binary serialiser (in development branch). 我正在使用orientdb社区版2.2.9和pyorient的二进制序列化器(在开发分支中)。

I have 3 nodes running on AWS. 我在AWS上运行了3个节点。

I'm only using 1 node as a master for writing/reading and the other nodes for reading and replication. 我只使用1个节点作为写入/读取的主节点,而其他节点用于读取和复制。

I have configured the nodes with the following: 我已使用以下配置节点:

<properties>
    <entry value="2147483647" name="ridBag.embeddedToSbtreeBonsaiThreshold"/>
    <entry value="-1" name="index.embeddedToSbtreeBonsaiThreshold"/>
</properties>

I'm not using Java so the MVCC examples in the documentation is not really helping me. 我没有使用Java,所以文档中的MVCC示例并没有真正帮助我。

I'm also not using transactions and I start the server with the following parameters: 我也没有使用事务,我使用以下参数启动服务器:

java -Dcache.level1.enabled=false -Ddb.mvcc=false 

I read in the docs that you can't disable mvcc any more so I assume that mvcc setting is useless. 我在文档中读到你不能再禁用mvcc所以我认为mvcc设置是无用的。

I use rabbitmq and celery to queue tasks. 我用rabbitmq和芹菜来排队任务。 When running orientDB in normal mode, when I get a "ConcurrentModificationException" error, celery will just retry that task and it usually succeeds. 在正常模式下运行orientDB时,当我收到“ConcurrentModificationException”错误时,芹菜只会重试该任务并且通常会成功。 When running in distributed mode, that task keeps failing because the vertices version never seem to match up. 分布式模式下运行时,该任务会一直失败,因为顶点版本似乎永远不会匹配。

It doesn't matter what I do, I keep getting " ConcurrentModificationException ". 无论我做什么都没关系,我一直得到“ ConcurrentModificationException ”。

I can see in the config that mvcc is still enabled. 我可以在配置中看到mvcc仍然启用。

I thought I tried everything the documentation suggested but all the nuances of running in distributed mode is scattered all over the documentation and not in one place. 我以为我尝试了文档建议的所有内容,但是在分布式模式下运行的所有细微差别都散布在整个文档中,而不是在一个地方。 It's so easy to miss something :( 很容易错过的东西:(

How can I avoid this issue? 我该如何避免这个问题?

Setting "writeQuorum" to 1 fixed this issue for me. 将“writeQuorum”设置为1可以解决此问题。 Also, running "executionMode" as "asynchronous" also created problems. 此外,将“executionMode”作为“异步”运行也会产生问题。

Also, removing the following from my config also may have helped with this issue: 另外,从我的配置中删除以下内容也可能有助于解决此问题:

....
<handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
    <parameters>
        ....
        <parameter value="com.orientechnologies.orient.server.distributed.conflict.ODefaultReplicationConflictResolver" name="conflict.resolver.impl"/>
        ....
    </parameters>
</handler>
...

Here is the default-distributed-db-config.json that got things working for me. 这是default-distributed-db-config.json,它让我的工作正常。

{
  "autoDeploy": true,
  "readQuorum": 1,
  "writeQuorum": 1,
  "executionMode": "synchronous",
  "readYourWrites": true,
  "servers": {
    "*": "master"
  },
  "clusters": {
    "internal": {
    },
    "*": {
     "servers": ["<NEW_NODE>"]
    }
  }
}

I hope it helps someone. 我希望它对某人有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM