Remove listed multipart parts in abort

Previously we unconditionally removed all possible part names.
This commit is contained in:
Andrew Gaul 2016-06-20 22:56:13 -07:00
parent 040df11d3f
commit 7a1c3a7b06
1 changed files with 3 additions and 2 deletions

View File

@ -789,8 +789,9 @@ public final class LocalBlobStore implements BlobStore {
@Override
public void abortMultipartUpload(MultipartUpload mpu) {
for (int i = 1; i <= 10 * 1000; ++i) {
storageStrategy.removeBlob(mpu.containerName(), mpu.blobName() + "-" + i);
List<MultipartPart> parts = listMultipartUpload(mpu);
for (MultipartPart part : parts) {
removeBlob(mpu.containerName(), mpu.blobName() + "-" + part.partNumber());
}
}