lowka commented on code in PR #6430:
URL: https://github.com/apache/ignite-3/pull/6430#discussion_r2294036766


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/ddl/ClusterWideStorageProfileValidator.java:
##########
@@ -49,14 +50,39 @@ public CompletableFuture<Void> validate(Collection<String> 
storageProfiles) {
                 localLogicalTopologySnapshot
         );
 
-        if (!missedStorageProfileNames.isEmpty()) {
-            throw new SqlException(STMT_VALIDATION_ERR, format(
-                    "Some storage profiles don't exist 
[missedProfileNames={}].",
-                    missedStorageProfileNames
-            ));
+        if (missedStorageProfileNames.isEmpty()) {
+            return CompletableFuture.completedFuture(null);
         }
 
-        return completedFuture(null);
+        return logicalTopologyService.logicalTopologyOnLeader()
+                    .thenApply(topologySnapshot -> 
findStorageProfileNotPresentedInLogicalTopologySnapshot(
+                            storageProfiles,
+                            topologySnapshot
+                    )).handle((missedProfileNames, e) -> {
+                        if (e != null) {
+                            String msg = format(
+                                    "Storage profile {} doesn't exist in local 
topology snapshot with profiles [{}], "
+                                            + "and distributed refresh 
failed.",
+                                    missedProfileNames,

Review Comment:
   missedProfileNames is always null if error is not null



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

Reply via email to