nastra opened a new pull request, #7621:
URL: https://github.com/apache/iceberg/pull/7621

   I noticed that not all relevant snapshots are being retained with a V1 table 
and when using branches. I added a test that reproduces this issue and would 
fail with 
   ```
   Snapshot for reference SnapshotRef{snapshotId=7532742534704478452, 
type=BRANCH, minSnapshotsToKeep=null, maxSnapshotAgeMs=null, maxRefAgeMs=null} 
does not exist in the existing snapshots list
   java.lang.IllegalArgumentException: Snapshot for reference 
SnapshotRef{snapshotId=7532742534704478452, type=BRANCH, 
minSnapshotsToKeep=null, maxSnapshotAgeMs=null, maxRefAgeMs=null} does not 
exist in the existing snapshots list
        at 
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
        at org.apache.iceberg.TableMetadata.validateRefs(TableMetadata.java:835)
        at 
org.apache.iceberg.TableMetadata.ensureSnapshotsLoaded(TableMetadata.java:528)
        at org.apache.iceberg.TableMetadata.snapshots(TableMetadata.java:493)
        at org.apache.iceberg.BaseTable.snapshots(BaseTable.java:140)
        at 
org.apache.iceberg.rest.TestRESTCatalog.testTableSnapshotLoadingWithDivergedBranches(TestRESTCatalog.java:953)
   ```
   
   This is because with V1 tables we removed non-relevant snapshots only based 
on timestamp.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to