Skip to content

Commit

Permalink
Do not retrieve Blob metadata on batch delete
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Oct 2, 2024
1 parent 30cffd1 commit f7a25a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ public void deleteFiles(Collection<Location> locations)
for (List<Location> locationBatch : partition(locations, batchSize)) {
StorageBatch batch = storage.batch();
for (Location location : locationBatch) {
getBlob(storage, new GcsLocation(location))
.ifPresent(blob -> batch.delete(blob.getBlobId()));
GcsLocation gcsLocation = new GcsLocation(location);
batch.delete(BlobId.of(gcsLocation.bucket(), gcsLocation.path()));
}
batchFutures.add(executorService.submit(batch::submit));
}
Expand Down

0 comments on commit f7a25a1

Please sign in to comment.