projectnessie / nessie

Nessie: Transactional Catalog for Data Lakes with Git-like semantics
https://projectnessie.org
Apache License 2.0
989 stars 130 forks source link

Committing operations: cleanup metadata after failures #8889

Closed snazy closed 2 months ago

snazy commented 3 months ago

Ensures that objects/files written during a commit are cleaned up if either one of the object/file write operations or the Nessie commit operation fails.

Refactors CatalogServiceImpl.MultiTableUpdate to be a top-level type and adds a list of successfully written objects/files in a separate exceptionally() stage, that calls ObjectIO.deleteObjects() for the written objects/files.

Fixes #8728