1

Orient DB を組み込みおよび分散で実行しようとしています。現在、hazelcast プラグインがアクティブな場合、ローカル DB を開くたびに StackOverflowError に直面しています。hazelcast プラグインをオフにすると、すべて問題ありません。

OrientDB は次のループに陥っています。

at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.onOpen(ODistributedAbstractPlugin.java:141)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:107)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:49)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:118)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:49)
at com.orientechnologies.orient.server.OServer.openDatabase(OServer.java:657)
at com.orientechnologies.orient.server.distributed.conflict.ODefaultReplicationConflictResolver.startup(ODefaultReplicationConflictResolver.java:74)
at com.orientechnologies.orient.server.distributed.OStorageSynchronizer.<init>(OStorageSynchronizer.java:56)
at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.getDatabaseSynchronizer(ODistributedAbstractPlugin.java:197)
at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.onOpen(ODistributedAbstractPlugin.java:141)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:107)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:49)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:118)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:49)
at com.orientechnologies.orient.server.OServer.openDatabase(OServer.java:657)
at com.orientechnologies.orient.server.distributed.conflict.ODefaultReplicationConflictResolver.startup(ODefaultReplicationConflictResolver.java:74)
at com.orientechnologies.orient.server.distributed.OStorageSynchronizer.<init>(OStorageSynchronizer.java:56)
at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.getDatabaseSynchronizer(ODistributedAbstractPlugin.java:197)
at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.onOpen(ODistributedAbstractPlugin.java:141)

ODatabaseRaw.open にはリスナーのリストがあり、Hazelcast がアクティブな場合、プラグインはリスナーとして登録され、メソッドが実行されるたびに呼び出されます。

誰にもアイデアはありますか?

編集:私はそれを機能させました.githubから分散構成を取得しました。次の行を削除すると機能します。

<parameter name="conflict.resolver.impl" value="com.orientechnologies.orient.server.distributed.conflict.ODefaultReplicationConflictResolver" />

ただし、これが良い解決策であるかどうかはよくわかりませんので、より良い解決策を自由に指摘してください =)

私の完全な構成は次のようになります: db.config:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orient-server>
<network>
     <protocols>
     <protocol name="binary" implementation="com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary"/>
     <protocol name="http" implementation="com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpDb"/>
     </protocols>
     <listeners>
     <listener ip-address="0.0.0.0" port-range="2480-2490" protocol="http"/>
     </listeners>
     </network>
     <users>
     <user name="root" password="ThisIsA_TEST" resources="*"/>
     </users>
     <properties>
     <entry name="server.cache.staticResources" value="false"/>
     <entry name="server.database.path" value="."/>
     <entry name="log.console.level" value="info"/> <entry name="log.file.level" value="fine"/>
     </properties>
  <handlers>
    <handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
      <parameters>
        <!-- <parameter name="alias" value="europe1" /> -->
        <parameter name="enabled" value="true" />
        <parameter name="configuration.db.default" value="src/main/resources/default-distributed-db-config.json" />
        <parameter name="configuration.hazelcast" value="src/main/resources/hazelcast.xml" />
        <parameter name="alignment.startup" value="true" />
        <parameter name="alignment.timer" value="120000" />
      </parameters>
    </handler>
  </handlers>
</orient-server>

default-distributed-db-config.json (github の例では「}」が抜けています):

{
  "synchronization" : true,
  "clusters" : {
    "internal" : { "synchronization" : false },
    "ODistributedConflict" : { "synchronization" : false },
    "*" : {
      "synchronization" : true,
      "master" : "$auto",
      "synch-replicas" : 0,
      "asynch-replicas" : "100%" },
    "index" : { "synchronization" : false }
    }
}

hazelcast.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-basic.xsd"
    xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <group>
        <name>orientdb</name>
        <password>orientdb</password>
    </group>
    <network>
        <port auto-increment="true">5701</port>
        <join>
            <multicast enabled="false">
                <multicast-group>224.2.2.3</multicast-group>
                <multicast-port>54327</multicast-port>
            </multicast>
            <tcp-ip enabled="true">
                <interface>127.0.0.1</interface>
            </tcp-ip>
        </join>
    </network>

</hazelcast>

編集2:

2 つのインスタンスが同期しようとすると、別の StackOverflowError が発生します。

java.lang.StackOverflowError
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:204)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-> java.lang.Thread.run(Thread.java:722)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
null
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:204)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-> java.lang.Thread.run(Thread.java:722)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)

分散および組み込みを実行する場合、まだあまり安定していないようです。本当に残念です、これまでのところそれが好きでした...

4

0 に答える 0