Add missing wait around deleteFile invocations.

This commit is contained in:
Suraj Gupta 2021-09-03 10:27:20 -04:00
parent fccfe3af78
commit bdbb0303f3
1 changed files with 6 additions and 4 deletions

View File

@ -217,8 +217,9 @@ ACTOR Future<BlobFileIndex> writeDeltaFile(BlobWorkerData* bwData,
if (BW_DEBUG) {
printf("deleting s3 delta file %s after error %s\n", fname.c_str(), e.name());
}
bwData->bstore->deleteFile(fname);
throw e;
state Error eState = e;
wait(bwData->bstore->deleteFile(fname));
throw eState;
}
}
@ -304,8 +305,9 @@ ACTOR Future<BlobFileIndex> writeSnapshot(BlobWorkerData* bwData,
if (BW_DEBUG) {
printf("deleting s3 snapshot file %s after error %s\n", fname.c_str(), e.name());
}
bwData->bstore->deleteFile(fname);
throw e;
state Error eState = e;
wait(bwData->bstore->deleteFile(fname));
throw eState;
}
if (BW_DEBUG) {