amogh-jahagirdar commented on code in PR #10679:
URL: https://github.com/apache/iceberg/pull/10679#discussion_r1673263709
##########
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java:
##########
@@ -387,14 +389,24 @@ private void deleteRemovedMetadataFiles(TableMetadata
base, TableMetadata metada
// the log, thus we don't include metadata.previousFiles() for deletion
- everything else can
// be removed
removedPreviousMetadataFiles.removeAll(metadata.previousFiles());
- Tasks.foreach(removedPreviousMetadataFiles)
- .noRetry()
- .suppressFailureWhenFinished()
- .onFailure(
- (previousMetadataFile, exc) ->
- LOG.warn(
- "Delete failed for previous metadata file: {}",
previousMetadataFile, exc))
- .run(previousMetadataFile ->
io().deleteFile(previousMetadataFile.file()));
+ if (io() instanceof SupportsBulkOperations) {
+ ((SupportsBulkOperations) io())
+ .deleteFiles(
+ Iterables.transform(
+ removedPreviousMetadataFiles,
TableMetadata.MetadataLogEntry::file));
+ } else {
+ LOG.warn(
+ "IO {} does not support bulk operations. Using non-bulk deletes.",
+ io().getClass().getName());
Review Comment:
imo don't think we need the log, at least I don't think warn level is
correct since it's not really indicative of any problems.
--
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]