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 00:33:55 UTC
lucene-solr:jira/solr-9954: 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/jira/solr-9954 [created] 4856550b4
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/4856550b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4856550b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4856550b
Branch: refs/heads/jira/solr-9954
Commit: 4856550b45548f376b6292aeef4d501fd3d85fd2
Parents: f99c967
Author: Timothy Potter <th...@gmail.com>
Authored: Tue Jan 10 17:33:50 2017 -0700
Committer: Timothy Potter <th...@gmail.com>
Committed: Tue Jan 10 17:33:50 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/4856550b/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0131b7b..0ee18ba 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
----------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4856550b/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);
+ }
}
}
}