You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2017/01/11 01:50:30 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x fc0bdeff2 -> f36a493d5


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


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f36a493d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f36a493d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f36a493d

Branch: refs/heads/branch_6x
Commit: f36a493d55bb9ed5676710146dcf3c51c7983ea6
Parents: fc0bdef
Author: Timothy Potter <th...@gmail.com>
Authored: Tue Jan 10 18:35:19 2017 -0700
Committer: Timothy Potter <th...@gmail.com>
Committed: Tue Jan 10 18:36:25 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                            | 3 +++
 solr/core/src/java/org/apache/solr/handler/SnapShooter.java | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f36a493d/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 2c9061a..e546ea6 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -293,6 +293,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
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f36a493d/solr/core/src/java/org/apache/solr/handler/SnapShooter.java
----------------------------------------------------------------------
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 bf02e4c..a6e8110 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);
+        }
       }
     }
   }