gargvishesh commented on code in PR #16047: URL: https://github.com/apache/druid/pull/16047#discussion_r1514514772
########## extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleStorage.java: ########## @@ -159,11 +167,23 @@ public void delete(final String bucket, final String path) throws IOException * @param bucket GCS bucket * @param paths Iterable for absolute paths of objects to be deleted inside the bucket */ - public void batchDelete(final String bucket, final Iterable<String> paths) throws IOException + public void batchDelete(final String bucket, final Iterable<String> paths) { - List<Boolean> statuses = storage.get().delete(Iterables.transform(paths, input -> BlobId.of(bucket, input))); + final List<Boolean> statuses = storage.get().delete(Iterables.transform(paths, input -> BlobId.of(bucket, input))); if (statuses.contains(false)) { - throw new IOE("Failed deleting google cloud storage object(s)"); + if (log.isDebugEnabled()) { + final List<String> failedPaths = new ArrayList<>(); + final Iterator<String> pathIterator = paths.iterator(); + int cursor = 0; + while (pathIterator.hasNext()) { + String failedPath = pathIterator.next(); + if (!statuses.get(cursor)) { + failedPaths.add(failedPath); + } + cursor++; + } + log.debug("Google cloud storage object(s) in bucket %s to be deleted not found. Paths: " + failedPaths, bucket); Review Comment: Done -- 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: commits-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org