Skip to content
11 changes: 11 additions & 0 deletions astra/src/main/java/com/slack/astra/blobfs/BlobStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ public void upload(String prefix, Path directoryToUpload) {
upload.failedTransfers().size()));
}
} catch (ExecutionException | InterruptedException e) {

// Sometimes the upload above will upload _some_ of the data before
// throwing an error. If that's the case, we need to clean up the data
// in S3
try {
this.delete(prefix);
LOG.info("Successfully cleaned up prefix {}.", prefix);
} catch (Exception _) {
LOG.info("Unable to cleanup prefix {}. Ignoring exception.", prefix);
}

throw new RuntimeException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public void addMessage(
}

/**
* This method initiates a roll over of the active chunk. In future, consider moving the some of
* This method initiates a roll over of the active chunk. In the future, consider moving some of
* the roll over logic into ChunkImpl.
*/
private void doRollover(ReadWriteChunk<T> currentChunk) {
Expand Down