sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.59k stars 1.15k forks source link

Does the startup sequence of the Node RPC Server service and the election service affect the election? #384

Closed juaby closed 4 years ago

juaby commented 4 years ago

Your question

com/alipay/sofa/jraft/RaftGroupService.java:130

        this.node = RaftServiceFactory.createAndInitRaftNode(this.groupId, this.serverId, this.nodeOptions);
        if (startRpcServer) {
            this.rpcServer.start();
        } else {
            LOG.warn("RPC server is not started in RaftGroupService.");
        }

Your scenes

Your advice

Node RPC Server服务和选举服务启动先后顺序是否对选举产生影响?

Environment

sofastack-bot[bot] commented 4 years ago

Hi @juaby, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.

We encourage you to describe your issue in English which is more friendly to other users.

Your question com / alipay / sofa / jraft / RaftGroupService.java: 130 `this.node = RaftServiceFactory.createAndInitRaftNode (this.groupId, this.serverId, this.nodeOptions); if (startRpcServer) {this.rpcServer .start ();} else {LOG.warn ("RPC server is not started in RaftGroupService.");} ### Your scenes ### Your advice Node Elections have an impact? ### Environment-SOFAJRaft version:-JVM version (egjava -version):-OS version (eg uname -a`):-Maven version:-IDE version:

killme2008 commented 4 years ago

不会有什么影响, rpc 暂时不可用,会继续重试,理论上只是加大了选举的延迟时间。