sanpwc commented on code in PR #3602:
URL: https://github.com/apache/ignite-3/pull/3602#discussion_r1563048136
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java:
##########
@@ -764,15 +773,29 @@ private NetworkMessage
prepareReplicaErrorResponse(boolean sendTimestamp, Throwa
* Idle safe time sync for replicas.
*/
private void idleSafeTimeSync() {
- replicas.values().forEach(r -> {
- if (r.isDone()) {
- ReplicaSafeTimeSyncRequest req =
REPLICA_MESSAGES_FACTORY.replicaSafeTimeSyncRequest()
- .groupId(r.join().groupId())
- .build();
+ for (Entry<ReplicationGroupId, CompletableFuture<Replica>> entry :
replicas.entrySet()) {
+ try {
+ sendSafeTimeSyncIfReplicaReady(entry.getValue());
+ } catch (Exception | AssertionError e) {
+ LOG.warn("Error while trying to send a safe time sync request
to {}", e, entry.getKey());
Review Comment:
I'd also mention that it's groupId in order not to confuse it with node
name/id. Both here and below.
--
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]