We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
由于某些原因,如果preVote的回调晚于startVote,那么存在 voteGranted的值是STATE_PRE_CANDIDATE阶段的,而不是STATE_CANDIDATE阶段。voteGranted的赋值是否应该放在条件判断之后?或者是我忽略了某些细节,导致理解不正确?
private class PreVoteResponseCallback implements RpcCallback<RaftProto.VoteResponse> { @Override public void success(RaftProto.VoteResponse response) { lock.lock(); try { //这里的赋值,是否应该放在条件判断之后? peer.setVoteGranted(response.getGranted()); if (currentTerm != request.getTerm() || state != NodeState.STATE_PRE_CANDIDATE) { LOG.info("ignore preVote RPC result"); return; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
由于某些原因,如果preVote的回调晚于startVote,那么存在 voteGranted的值是STATE_PRE_CANDIDATE阶段的,而不是STATE_CANDIDATE阶段。voteGranted的赋值是否应该放在条件判断之后?或者是我忽略了某些细节,导致理解不正确?
The text was updated successfully, but these errors were encountered: