Dell: EcsCatalog leaks S3Exception for missing namespace properties
- Dominant language
- Java
- Stars
- 9.2k
- Forks
- 3.5k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 129
Description
**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.
Contributor guide
Research direction
Start in dell/src/main/java/org/apache/iceberg/dell/ecs/EcsCatalog.java at setProperties(), removeProperties(), updateProperties(), and loadProperties(). Reproduce the missing-namespace case with the in-memory EcsS3MockRule, including Namespace.empty(), and verify both operations report NoSuchNamespaceException rather than the vendor S3Exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100