Copilot commented on code in PR #12553:
URL: https://github.com/apache/gravitino/pull/12553#discussion_r3830580021
##########
core/src/main/java/org/apache/gravitino/listener/CatalogEventDispatcher.java:
##########
@@ -203,6 +203,12 @@ public void testConnection(
dispatcher.testConnection(ident, type, provider, comment, properties);
}
+ @Override
+ public void testConnection(NameIdentifier ident) throws Exception {
+ // TODO: Support event dispatching for testConnection
Review Comment:
A new TODO was introduced without an issue reference. Repository guidelines
require TODO/FIXME comments to include an issue ID so they don’t become
permanent debt.
##########
catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java:
##########
@@ -1065,31 +1101,6 @@ private Map<String, Path>
getAndCheckCatalogStorageLocations(Map<String, String>
checkPlaceholderValue(v);
- if (!disableFSOps && !containsPlaceholder(v)) {
- Path path = new Path(v);
- // At catalog initialization, only merge catalog config and
user-defined location
- // configs
- Map<String, String> fsConf = new HashMap<>(conf);
- fsConf.putAll(
- FilesetUtil.getUserDefinedFileSystemConfigs(
- path.toUri(),
- conf,
-
FilesetCatalogPropertiesMetadata.FS_GRAVITINO_PATH_CONFIG_PREFIX));
- FileSystem fs = getFileSystemWithCache(path, fsConf);
- try {
- if (fs.exists(path) && fs.getFileStatus(path).isFile()) {
- throw new IllegalArgumentException(
- "Fileset catalog location cannot be a file: "
- + v
- + ", location name: "
- + locationName);
- }
- } catch (IOException e) {
- throw new RuntimeException(
- "Failed to check if fileset catalog location exists: " +
v, e);
- }
- }
-
catalogStorageLocations.put(locationName, new
Path((ensureTrailingSlash(v))));
Review Comment:
`getAndCheckCatalogStorageLocations` no longer validates that a configured
catalog-level location isn’t an existing file (when filesystem operations are
enabled and the location has no placeholders). This can allow invalid catalog
configs to be accepted and later fail with less clear errors when creating
schemas/filesets or when running probes.
--
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]