ivanzlenko commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971771403
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,20 @@ static void onHeartbeatReturned(final ThreadId id, final
Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator
replicator) {
+ PeerId peerId = replicator.options.getPeerId();
+ int consecutiveErrorTimes = replicator.consecutiveErrorTimes;
+
+ if (status.getRaftError() == RaftError.ENOENT) {
+ // Maybe the target node was not able to start yet, no need to
WARN here.
+ LOG.info("Fail to issue RPC to {}, consecutiveErrorTimes={},
error={}", peerId,
+ consecutiveErrorTimes, status);
Review Comment:
Now it nicely fits into one line ;)
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,20 @@ static void onHeartbeatReturned(final ThreadId id, final
Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator
replicator) {
+ PeerId peerId = replicator.options.getPeerId();
+ int consecutiveErrorTimes = replicator.consecutiveErrorTimes;
+
+ if (status.getRaftError() == RaftError.ENOENT) {
+ // Maybe the target node was not able to start yet, no need to
WARN here.
+ LOG.info("Fail to issue RPC to {}, consecutiveErrorTimes={},
error={}", peerId,
+ consecutiveErrorTimes, status);
+ } else {
+ LOG.warn("Fail to issue RPC to {}, consecutiveErrorTimes={},
error={}", peerId,
+ consecutiveErrorTimes, status);
Review Comment:
```suggestion
LOG.warn("Fail to issue RPC to {}, consecutiveErrorTimes={},
error={}", peerId, consecutiveErrorTimes, status);
```
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,20 @@ static void onHeartbeatReturned(final ThreadId id, final
Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator
replicator) {
+ PeerId peerId = replicator.options.getPeerId();
+ int consecutiveErrorTimes = replicator.consecutiveErrorTimes;
+
+ if (status.getRaftError() == RaftError.ENOENT) {
+ // Maybe the target node was not able to start yet, no need to
WARN here.
+ LOG.info("Fail to issue RPC to {}, consecutiveErrorTimes={},
error={}", peerId,
+ consecutiveErrorTimes, status);
Review Comment:
```suggestion
LOG.info("Fail to issue RPC to {}, consecutiveErrorTimes={},
error={}", peerId, consecutiveErrorTimes, status);
```
--
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]