Skip to content

purge_table raises if a manifest or manifest list was already removed by the catalog #4625

Backlog
Zu67/iceberg-python
#1

Description

@Zu67

Feature Request / Improvement

Follow-up from the discussion on #4617.

purge_table reads manifest lists and manifests before it calls delete_files, through snapshot.manifests() and fetch_manifest_entry in pyiceberg/catalog/__init__.py. Neither path handles FileNotFoundError. With a REST catalog that removes files eagerly, for example during a commit or a server-side drop, some of those files can already be gone. Then the purge raises before cleanup starts, and the rest of the table's files are left behind.

#4617 made delete_files treat an already-missing file as deleted. This issue is about the read side of the purge.

Proposal: while collecting files to purge, a manifest list or manifest that no longer exists should be skipped and logged at debug level, and the purge should go on deleting everything it can still find. Other errors should still propagate.

Happy to open a PR for this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions