sanpwc commented on code in PR #6419:
URL: https://github.com/apache/ignite-3/pull/6419#discussion_r2276424990
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/ReplicatorGroupImpl.java:
##########
@@ -119,14 +122,16 @@ public boolean addReplicator(final PeerId peer, final
ReplicatorType replicatorT
assert client != null;
if (!client.connect(peer)) {
- if (!failureReplicators.containsKey(peer)) {
+ boolean added =
failureReplicatorsSetToPreventLogFlooding.add(peer);
+
+ if (added) {
LOG.error("Fail to check replicator connection to peer={},
replicatorType={}.", peer, replicatorType);
}
this.failureReplicators.put(peer, replicatorType);
return false;
} else {
- failureReplicators.remove(peer);
+ failureReplicatorsSetToPreventLogFlooding.remove(peer);
Review Comment:
Because we no longer need the logic for logging purposes and because
originally there was no else clause with removal, thus removal is not needed
for non-logging purposes also.
```
if (!client.connect(peer)) {
LOG.error("Fail to check replicator connection to peer={},
replicatorType={}.", peer, replicatorType);
this.failureReplicators.put(peer, replicatorType);
return false;
}
```
--
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