Skip to content

Commit d2fb32f

Browse files
committed
Apply suggestion
1 parent 02a6708 commit d2fb32f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

core/src/main/java/com/scalar/db/storage/objectstorage/blob/BlobWrapper.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,16 @@ public void deleteByPrefix(String prefix) throws ObjectStorageWrapperException {
177177
try {
178178
client
179179
.listBlobs(new ListBlobsOptions().setPrefix(prefix), requestTimeoutInSeconds)
180-
.forEach(blobItem -> client.getBlobClient(blobItem.getName()).delete());
180+
.forEach(
181+
blobItem -> {
182+
try {
183+
client.getBlobClient(blobItem.getName()).delete();
184+
} catch (BlobStorageException e) {
185+
if (!e.getErrorCode().equals(BlobErrorCode.BLOB_NOT_FOUND)) {
186+
throw e;
187+
}
188+
}
189+
});
181190
} catch (Exception e) {
182191
throw new ObjectStorageWrapperException(
183192
String.format("Failed to delete the objects with prefix '%s'", prefix), e);

0 commit comments

Comments
 (0)