You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/18 17:25:23 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #5568: Core: Don't clear snapshot log when intermediate snapshots are detected

nastra commented on code in PR #5568:
URL: https://github.com/apache/iceberg/pull/5568#discussion_r949411741


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1582,13 +1582,6 @@ private static List<HistoryEntry> updateSnapshotLog(
             && !intermediateSnapshotIds.contains(snapshotId)) {
           // copy the log entries that are still valid
           newSnapshotLog.add(logEntry);
-        } else {
-          // any invalid entry causes the history before it to be removed. otherwise, there could be
-          // history gaps that cause time-travel queries to produce incorrect results. for example,
-          // if history is [(t1, s1), (t2, s2), (t3, s3)] and s2 is removed, the history cannot be
-          // [(t1, s1), (t3, s3)] because it appears that s3 was current during the time between t2
-          // and t3 when in fact s2 was the current snapshot.
-          newSnapshotLog.clear();

Review Comment:
   makes total sense, thanks



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org