ggershinsky commented on code in PR #16353:
URL: https://github.com/apache/iceberg/pull/16353#discussion_r4007259437


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1451,6 +1451,7 @@ private Builder rewriteSnapshotsInternal(Collection<Long> 
idsToRemove, boolean s
           }
           removeStatistics(snapshotId);
           removePartitionStatistics(snapshotId);
+          removeEncryptionKey(snapshot.keyId());

Review Comment:
   > motivations behind making snapshot encryption keys stored in the snapshot 
metadata on whether we should rely on this invariant of snapshot -> key being 
1:1.
   
   Today, there are two kinds of entries in the TableMetadata "encrypted keys" 
list. One is the manifest list keys, and the other is key encryption keys (the 
former are encrypted by the latter). Key encryption keys are re-used for a long 
time, but still should be cleaned up after all manifest list keys, encrypted by 
them, are removed.



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