You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "denis-chudov (via GitHub)" <gi...@apache.org> on 2023/06/08 08:29:03 UTC

[GitHub] [ignite-3] denis-chudov commented on a diff in pull request #2144: IGNITE-19136 Handling timeout on waiting for replica readiness

denis-chudov commented on code in PR #2144:
URL: https://github.com/apache/ignite-3/pull/2144#discussion_r1222598525


##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaService.java:
##########
@@ -127,17 +127,27 @@ private <R> CompletableFuture<R> sendToReplica(String targetNodeConsistentId, Re
                             pendingInvokes.remove(targetNodeConsistentId, awaitReplicaFut);
 
                             if (throwable0 != null) {
-                                if (throwable0 instanceof CompletionException) {
-                                    throwable0 = throwable0.getCause();
-                                }
+                                throwable0 = unwrapCause(throwable0);
 
                                 if (throwable0 instanceof TimeoutException) {
-                                    res.completeExceptionally(errResp.throwable());
+                                    res.completeExceptionally(withCause(
+                                            ReplicationException::new,
+                                            REPLICA_TIMEOUT_ERR,
+                                            format(
+                                                    "Could not wait for the replica readiness for the timeout [replicaGroupId={}, req={}]",

Review Comment:
   ```suggestion
                                                       "Could not wait for the replica readiness due to timeout [replicaGroupId={}, req={}]",
   ```



-- 
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