dimas-b commented on code in PR #4730:
URL: https://github.com/apache/polaris/pull/4730#discussion_r3421572423
##########
runtime/service/src/main/java/org/apache/polaris/service/task/TableCleanupTaskHandler.java:
##########
@@ -151,6 +157,34 @@ public boolean handleTask(TaskEntity cleanupTask,
CallContext callContext) {
return false;
}
+ private boolean handleViewCleanup(TaskEntity cleanupTask,
IcebergTableLikeEntity viewEntity) {
+ LOGGER
+ .atInfo()
+ .addKeyValue("viewIdentifier", viewEntity.getTableIdentifier())
+ .addKeyValue("metadataLocation", viewEntity.getMetadataLocation())
+ .log("Handling view metadata cleanup task");
+
+ try (FileIO fileIO = fileIOSupplier.apply(cleanupTask,
viewEntity.getTableIdentifier())) {
+ if (!TaskUtils.exists(viewEntity.getMetadataLocation(), fileIO)) {
+ LOGGER
+ .atWarn()
+ .addKeyValue("viewIdentifier", viewEntity.getTableIdentifier())
+ .addKeyValue("metadataLocation", viewEntity.getMetadataLocation())
+ .log("View metadata cleanup scheduled, but metadata file does not
exist");
+ return true;
+ }
+
+ fileIO.deleteFile(viewEntity.getMetadataLocation());
Review Comment:
TBH, I find this behaviour very confusing. Not dropping previous metadata
files does not make the "purge" complete, I think :thinking:
Would you mind opening a `dev` ML thread on this for visibility to other
community members?
--
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]