diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 0131b7bbb8b..0ee18ba0f87 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -353,6 +353,9 @@ Bug Fixes and CloudMLTQParser included extra strings from the field definitions in the query. (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 ---------------------- diff --git a/solr/core/src/java/org/apache/solr/handler/SnapShooter.java b/solr/core/src/java/org/apache/solr/handler/SnapShooter.java index bf02e4c33c5..a6e811048eb 100644 --- a/solr/core/src/java/org/apache/solr/handler/SnapShooter.java +++ b/solr/core/src/java/org/apache/solr/handler/SnapShooter.java @@ -231,7 +231,11 @@ public class SnapShooter { return details; } finally { 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); + } } } }