sanpwc commented on code in PR #6278: URL: https://github.com/apache/ignite-3/pull/6278#discussion_r2215969226
########## modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java: ########## @@ -1187,19 +1190,10 @@ private boolean initBallotBox() { // TODO: uncomment when backport related change https://issues.apache.org/jira/browse/IGNITE-22923 //ballotBoxOpts.setNodeId(getNodeId()); // Try to initialize the last committed index in BallotBox to be the last snapshot index. - long lastCommittedIndex = 0; - if (this.snapshotExecutor != null) { - lastCommittedIndex = this.snapshotExecutor.getLastSnapshotIndex(); - } - if (this.getQuorum() == 1) { - // It is safe to initiate lastCommittedIndex as last log one because in case of single peer no one will discard - // log records on leader election. - // Fix https://github.com/sofastack/sofa-jraft/issues/1049 - lastCommittedIndex = Math.max(lastCommittedIndex, this.logManager.getLastLogIndex()); - } + long lastCommittedIndex = getLastCommittedIndex(); ballotBoxOpts.setLastCommittedIndex(lastCommittedIndex); - LOG.info("Node {} init ballot box's lastCommittedIndex={}.", getNodeId(), lastCommittedIndex); + LOG.debug("Node {} init ballot box's lastCommittedIndex={}.", getNodeId(), lastCommittedIndex); Review Comment: getNodeId() contains groupId ########## modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java: ########## @@ -3019,7 +3013,7 @@ public void handlePreVoteResponse(final PeerId peerId, final long term, final Re "Raft node receives higher term pre_vote_response.")); return; } - LOG.info("Node {} received PreVoteResponse from {}, term={}, granted={}.", getNodeId(), peerId, + LOG.debug("Node {} received PreVoteResponse from {}, term={}, granted={}.", getNodeId(), peerId, Review Comment: Same about getNodeId() -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org