incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

bug:开启raft后,用rocksdb作为存储后端,无法开启多图

Open chentianlong1993 opened this issue 6 years ago • 1 comments

Expected behavior 期望表现

开启raft,可以配置多图,并启动使用

Actual behavior 实际表现

server无法启动

Steps to reproduce the problem 复现步骤

后端用rocksdb作为存储,配置2个图,执行init后执行start

分析: 配置多图时,会根据配置图的数量,生成对应数量的BackendStoreProvider,开启raft后,生成的RaftBackendStoreProvider会在构造方法中创建RaftSharedContext实例,而RaftSharedContext的实例中会初始化并创建rpcserver,这就导致了会以同一个端口启动多次rpcserver,导致整个server无法启动。请评估上述是否为代码逻辑问题。

chentianlong1993 avatar Sep 09 '20 11:09 chentianlong1993

@chentianlong1993 配置多图时,第二个图(假设名为hugegraph2)的配置文件hugegraph2.properties的raft.endpoint和raft.group_peers需要修改,将端口替换一下便可以启动了。 目前的方案每个图的rpcserver都是隔离的,后续会尝试对比使用同一个rpcserver的方案。

Linary avatar Sep 21 '20 09:09 Linary