Skip to content

Snapshot rollback doesn't work #3068

@Gurnek

Description

@Gurnek

Apache Iceberg version

None

Please describe the bug 🐞

Hello, I have encountered an issue with the rollback functionality. I have my data in a Glue catalog, and I am running the following code in some form:

tbl = catalog.load_table('db.table')
print(tbl.metdata.current_snapshot_id)
tbl.manage_snapshots().rollback_to_snapshot(123).commit() # 123 in this case would be a snapshot id that I know is an ancestor
print(tbl.metadata.current_snapshot_id) # will print the same thing as before

The table will still read from the same snapshot, however if I try to call rollback_to_snapshot(123) again, it will give the error snapshot 123 is not an ancestor of current state: 123.

Any help would be appreciated

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time

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