RussellSpitzer commented on code in PR #6682: URL: https://github.com/apache/iceberg/pull/6682#discussion_r1121996881
########## core/src/main/java/org/apache/iceberg/hadoop/HadoopFileIO.java: ########## @@ -149,6 +165,45 @@ public void deletePrefix(String prefix) { } } + @Override + public void deleteFiles(Iterable<String> pathsToDelete) throws BulkDeletionFailureException { + AtomicInteger failureCount = new AtomicInteger(0); + Tasks.foreach(pathsToDelete) + .executeWith(executorService()) + .retry(3) + .stopRetryOn(FileNotFoundException.class) + .suppressFailureWhenFinished() + .onFailure( + (f, e) -> { + LOG.error("Failure during bulk delete on file: {} ", f, e); + failureCount.incrementAndGet(); Review Comment: I double checked this, it only fires off when all retries are exhausted so it is correct as is. ```scala scala> def testFailure() = { var failureCount =0 Tasks.foreach("value") .retry(3) .onFailure((y, x: Throwable) => failureCount += 1) .suppressFailureWhenFinished() .run(x => throw new Exception("ohNO")) failureCount } scala> testFailure() 23/03/01 10:16:22 WARN Tasks: Retrying task after failure: ohNO java.lang.Exception: ohNO ... 23/03/01 10:16:23 WARN Tasks: Retrying task after failure: ohNO java.lang.Exception: ohNO ... 23/03/01 10:16:25 WARN Tasks: Retrying task after failure: ohNO java.lang.Exception: ohNO ... res21: Int = 1 ```` -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org