sanpwc commented on code in PR #6843:
URL: https://github.com/apache/ignite-3/pull/6843#discussion_r2480702053


##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1239,6 +1239,15 @@ void onHeartbeatReturned(final ThreadId id, final Status 
status, final AppendEnt
                 r.startHeartbeatTimer(startTimeMs);
                 return;
             }
+            if (!response.success()) {
+                 long term = 
this.options.getLogManager().getTerm(response.lastLogIndex());
+                 if (term < r.options.getTerm()) {
+                      LOG.info("Heartbeat to nodeId {}, groupId {} failure 
with outdated term, try to send a probe request.", 
r.options.getNode().getNodeId(), r.options.getGroupId());
+                      r.sendProbeRequest();

Review Comment:
   Should we also call `doUnlock = false;` like we do in `if 
(!response.success() && response.lastLogIndex() != 0) {`?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to