You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "rpuch (via GitHub)" <gi...@apache.org> on 2025/02/26 11:42:51 UTC
[PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
rpuch opened a new pull request, #5299:
URL: https://github.com/apache/ignite-3/pull/5299
https://issues.apache.org/jira/browse/IGNITE-24643
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971768076
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
Review Comment:
Done
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
+ 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={}", r.options.getPeerId(),
+ r.consecutiveErrorTimes, status);
Review Comment:
Done
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971605445
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
Review Comment:
Let's name it replicator :)
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
+ 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={}", r.options.getPeerId(),
+ r.consecutiveErrorTimes, status);
Review Comment:
I would've move r.options.getPeerId() and r.consecutiveErrorTimes into variables just to improve readability.
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
+ if (status.getRaftError() == RaftError.ENOENT) {
+ // Maybe the target node was not able to start yet, no need to WARN here.
Review Comment:
Can we move it to javaDoc?
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971790957
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
Review Comment:
Ah, I see, thanks.
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971612215
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
Review Comment:
P.S. quite to be honest PMD rule to prevent single symbol names is a good one and we shall consider enable it ;)
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971617293
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
+ if (status.getRaftError() == RaftError.ENOENT) {
+ // Maybe the target node was not able to start yet, no need to WARN here.
Review Comment:
I doubt it's needed there. Javadoc is about method interface, but here it's an implementation detail
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971788431
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
Review Comment:
This is JRaft code (not ours), we try to touch it as little as possible, so the checks (checkstyle/PMD/whatever) are disabled in this module
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299#discussion_r1971620674
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/Replicator.java:
##########
@@ -1240,6 +1239,17 @@ static void onHeartbeatReturned(final ThreadId id, final Status status, final Ap
}
}
+ private static void logFailToIssueRpc(Status status, Replicator r) {
+ if (status.getRaftError() == RaftError.ENOENT) {
+ // Maybe the target node was not able to start yet, no need to WARN here.
Review Comment:
It can contain implementation details, especially for private methods.
At least at will be nicer to read what is going on and we need to branch.
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24643 Lower logging level for 'Peer id not found' in Replicator [ignite-3]
Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch merged PR #5299:
URL: https://github.com/apache/ignite-3/pull/5299
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org