SOLR-9954: Prevent against failure during failed snapshot cleanup from swallowing the actual cause for the snapshot to fail.

This commit is contained in:
Timothy Potter 2017-01-10 18:35:19 -07:00
parent f99c967632
commit 118fc422d0
2 changed files with 8 additions and 1 deletions

View File

@ -353,6 +353,9 @@ Bug Fixes
and CloudMLTQParser included extra strings from the field definitions in the query. and CloudMLTQParser included extra strings from the field definitions in the query.
(Ere Maijala via Anshum Gupta) (Ere Maijala via Anshum Gupta)
* SOLR-9954: Prevent against failure during failed snapshot cleanup from swallowing the actual cause
for the snapshot to fail. (thelabdude)
Other Changes Other Changes
---------------------- ----------------------

View File

@ -231,7 +231,11 @@ public class SnapShooter {
return details; return details;
} finally { } finally {
if (!success) { if (!success) {
backupRepo.deleteDirectory(snapshotDirPath); try {
backupRepo.deleteDirectory(snapshotDirPath);
} catch (Exception excDuringDelete) {
LOG.warn("Failed to delete "+snapshotDirPath+" after snapshot creation failed due to: "+excDuringDelete);
}
} }
} }
} }