amogh-jahagirdar commented on code in PR #18999:
URL: https://github.com/apache/iceberg/pull/18999#discussion_r4592537023
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/ExpireSnapshotsSparkAction.java:
##########
@@ -153,8 +155,12 @@ public ExpireSnapshotsSparkAction
cleanExpiredMetadata(boolean clean) {
*/
public Dataset<FileInfo> expireFiles() {
if (expiredFileDS == null) {
- // fetch metadata before expiration
- TableMetadata originalMetadata = ops.current();
+ TableMetadata originalMetadata = ops.refresh();
Review Comment:
Just a note to anyone else reviewing this later, while this is an extra
catalog call it's only temporarily until we support v4 snapshot expiration
which depends on metadata table support. I think this is also OK since we're
talking about snapshot expiration which relative to reads/general writes is a
lower frequency anyways. It's better to catch that an upgrade happened before
we proceed and do any cleanup work at the cost of the extra call.
--
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]