Skip to content

Dell: Throw NoSuchNamespaceException when updating missing namespace#17271

Draft
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/dell-updateproperties-nosuchnamespace
Draft

Dell: Throw NoSuchNamespaceException when updating missing namespace#17271
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/dell-updateproperties-nosuchnamespace

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Closes #17270

Summary

  • EcsCatalog.setProperties() and removeProperties() leaked the vendor exception com.emc.object.s3.S3Exception (404 NoSuchKey) for a missing namespace.
  • Both delegate to updateProperties(), which called loadProperties() with no existence check; loadProperties() does not translate 404, unlike objectMetadata().
  • Every sibling catalog supporting namespace properties checks first — InMemoryCatalog, JdbcCatalog, GlueCatalog — as does loadNamespaceMetadata() here. EcsCatalog was the only leak.
  • Both signatures already declare throws NoSuchNamespaceException. SupportsNamespaces marks that @throws (optional), which permits not throwing — not leaking a vendor exception.
  • Namespace.empty() (root) has no properties object, so it now raises NoSuchNamespaceException rather than S3Exception; only the exception type changes.

The check follows the dominant idiom in this class (listNamespaces(), dropNamespace()):

if (!namespaceExists(namespace)) {
  throw new NoSuchNamespaceException("Namespace %s does not exist", namespace);
}

Testing done

  • Added TestEcsCatalog#namespacePropertiesOfMissingNamespace covering both methods; it fails on main with S3Exception.
  • ./gradlew :iceberg-dell:check — 26 tests passed.
  • dell/ is outside the published REVAPI modules, so no revapi run.

EcsCatalog.setProperties() and removeProperties() share updateProperties(),
which read the namespace properties object without checking that the
namespace exists. For a missing namespace the ECS SDK raised a raw
S3Exception (404 NoSuchKey) instead of the NoSuchNamespaceException both
methods declare.

Check namespaceExists() first, matching loadNamespaceMetadata(),
listNamespaces() and dropNamespace() in the same class, and the sibling
catalogs InMemoryCatalog, JdbcCatalog and GlueCatalog.

Generated-by: Claude Code
@github-actions github-actions Bot added the DELL label Jul 17, 2026
@thswlsqls
thswlsqls marked this pull request as draft July 17, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dell: EcsCatalog leaks S3Exception for missing namespace properties

1 participant