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/05/11 20:12:40 UTC

[GitHub] [iceberg] rdblue commented on pull request #4747: Core: Fix data loss when duplicate snapshot-id is allocated

rdblue commented on PR #4747:
URL: https://github.com/apache/iceberg/pull/4747#issuecomment-1124244241

   Looks like what's happening is that the snapshot is never added. It hits this check: https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/TableMetadata.java#L984-L985
   
   I think we can fix this by changing `SnapshotProducer`:
   
   ```diff
   + while (snapshotId == null || ops.current().snapshot(snapshotId) != null) {
   - if (snapshotId != null) {
       this.snapshotId = ops.newSnapshotId();
     }
   ```


-- 
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