Skip to content

Add ExpireSnapshotsAction for snapshot lifecycle management #2145

Closed

Description

@drbothen

Is your feature request related to a problem or challenge?

There is currently no way to remove old snapshots from table metadata via the transaction API. Over time, tables accumulate snapshots which increases metadata size and makes operations slower. Issue #1454 was filed for this but closed without an implementation landing.

Describe the solution you'd like

Add an ExpireSnapshotsAction that:

  1. Removes specified snapshots from table metadata (by ID or by age cutoff)
  2. Respects a minimum retention count (always keeps at least N most recent snapshots)
  3. Never expires the current snapshot
  4. Returns RemoveSnapshots table update (does NOT delete physical files)

Also add a find_unreferenced_files() utility that identifies data files, manifests, and manifest lists that are only referenced by expired snapshots and can be safely deleted.

Willingness to contribute

I am willing to submit a PR for this feature.

Activity

  1. dhruvarya-db commented on May 29, 2026

    @dhruvarya-db
    Contributor

    Hi @drbothen , I saw your closed PR for this. Do you still plan to get it merged or is it okay if I pick this up?

  2. added a commit that references this issue on Jun 17, 2026
    904f30c
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