mchades commented on code in PR #12553:
URL: https://github.com/apache/gravitino/pull/12553#discussion_r3844023299


##########
catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java:
##########
@@ -946,24 +975,31 @@ public boolean dropSchema(NameIdentifier ident, boolean 
cascade) throws NonEmpty
     }
   }
 
-  /**
-   * Since the Fileset catalog was completely managed by Gravitino, we don't 
need to test the
-   * connection
-   *
-   * @param catalogIdent the name of the catalog.
-   * @param type the type of the catalog.
-   * @param provider the provider of the catalog.
-   * @param comment the comment of the catalog.
-   * @param properties the properties of the catalog.
-   */
   @Override
-  public void testConnection(
-      NameIdentifier catalogIdent,
-      Catalog.Type type,
-      String provider,
-      String comment,
-      Map<String, String> properties) {
-    // Do nothing
+  public void testConnection(NameIdentifier catalogIdent) {
+    if (disableFSOps) {
+      throw new UnsupportedOperationException(
+          "Fileset connection testing requires filesystem operations to be 
enabled");
+    }
+    if (catalogStorageLocations.isEmpty()) {
+      throw new IllegalArgumentException("Fileset catalog has no catalog-level 
location to test");
+    }
+
+    Map<String, Path> probeLocations = resolveProbeLocations(catalogIdent);
+    List<String> failures = new ArrayList<>();
+    probeLocations.forEach(

Review Comment:
   This is the same concurrency trade-off discussed in [the earlier 
thread](https://github.com/apache/gravitino/pull/12553#discussion_r3841065887). 
As noted there, multi-location Fileset catalogs are uncommon, so I’m keeping 
the probes sequential in this PR to avoid additional timeout, cancellation, and 
resource-cleanup complexity. We can optimize this separately if it becomes a 
practical latency issue.



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