korlov42 commented on code in PR #6932:
URL: https://github.com/apache/ignite-3/pull/6932#discussion_r2513079517


##########
modules/client/src/main/java/org/apache/ignite/internal/client/sql/PartitionMappingProvider.java:
##########
@@ -57,11 +59,23 @@ static PartitionMappingProvider create(
                 meta.indexes(),
                 meta.hash(),
                 meta.directTxMode(),
-                () -> schemaFuture.getNow(null),
-                () -> table.getPartitionAssignment().getNow(null)
+                () -> nullOnError(schemaFuture, onErrorCallback).getNow(null),
+                () -> nullOnError(table.getPartitionAssignment(), 
onErrorCallback).getNow(null)
         );
     }
 
+    private static <T> CompletableFuture<@Nullable T> 
nullOnError(CompletableFuture<T> future, Consumer<Throwable> onErrorCallback) {
+        return future.handle((result, throwable) -> {
+            if (throwable != null) {
+                onErrorCallback.accept(throwable);
+
+                return null;
+            }
+
+            return result;
+        });

Review Comment:
   done, 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to