thswlsqls opened a new issue, #17270:
URL: https://github.com/apache/iceberg/issues/17270
**Apache Iceberg version**
main @ 5f3d3c560
**Query engine**
None — the catalog implementation surfaces this directly.
**Please describe the bug**
`EcsCatalog.setProperties()` and `removeProperties()` leak the vendor
exception `com.emc.object.s3.S3Exception` (404 `NoSuchKey`) for a missing
namespace.
Both delegate to `updateProperties()`
(`dell/src/main/java/org/apache/iceberg/dell/ecs/EcsCatalog.java` line 363),
which calls `loadProperties()` (line 367) with no existence check.
`loadProperties()` (line 433) does not translate 404, unlike `objectMetadata()`
(line 400).
Every sibling catalog supporting namespace properties checks first:
`InMemoryCatalog` (247-252, 267-272), `JdbcCatalog` (577-581, 621-625),
`GlueCatalog` (592-596). So does `loadNamespaceMetadata()` (line 321) in this
same class. `EcsCatalog` is the only one leaking a vendor SDK type.
`SupportsNamespaces` marks this `@throws` `(optional)`, so an implementation
may skip it — but that does not license a vendor-specific exception, and both
signatures here declare `throws NoSuchNamespaceException`.
**Steps to reproduce**
Call `setProperties(Namespace.of("unknown"), ImmutableMap.of("a", "a"))` on
an `EcsCatalog`; same for `removeProperties()`. Reproducible with the in-memory
`EcsS3MockRule`.
- Expected: `NoSuchNamespaceException`
- Actual: `com.emc.object.s3.S3Exception: 404 NoSuchKey`
**Additional context**
`Namespace.empty()` (root) has no properties object, so it also raises
`NoSuchNamespaceException` once fixed. It already failed with `S3Exception`, so
only the exception type changes. Note `listNamespaces()` (280) and
`dropNamespace()` (337) exempt the root.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]