You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2018/08/15 12:09:03 UTC

lucene-solr:branch_7x: SOLR-12523: Improve error reporting and docs regarding Collection backup feature shared-fs requirement

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 38189360f -> 806d087ad


SOLR-12523: Improve error reporting and docs regarding Collection backup feature shared-fs requirement

(cherry picked from commit f3339d1)


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

Branch: refs/heads/branch_7x
Commit: 806d087adf9ab5f3afd45714686ad3a29e6aa508
Parents: 3818936
Author: Jan Høydahl <ja...@apache.org>
Authored: Wed Aug 15 13:38:05 2018 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Wed Aug 15 13:50:06 2018 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                                 | 2 ++
 .../java/org/apache/solr/cloud/api/collections/BackupCmd.java    | 2 +-
 .../src/java/org/apache/solr/handler/admin/BackupCoreOp.java     | 4 +++-
 solr/solr-ref-guide/src/making-and-restoring-backups.adoc        | 2 ++
 4 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/806d087a/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index dc95829..491b06e 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -230,6 +230,8 @@ Other Changes
 
 * SOLR-12208: Renamed the autoscaling variable 'INDEX.sizeInBytes' to 'INDEX.sizeInGB' (noble)
 
+* SOLR-12523: Improve error reporting and docs regarding Collection backup feature shared-fs requirement (janhoy)
+
 * SOLR-12468: Upgrade Jetty to 9.4.11.v20180605 (Michael Braun, shalin)
 
 * SOLR-12527: factor out a test-framework/ConfigRequest class (Christine Poerschke)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/806d087a/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
index c8e99dc..b8aba76 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
@@ -221,6 +221,6 @@ public class BackupCmd implements OverseerCollectionMessageHandler.Cmd {
     }
     log.debug("Sent backup requests to all shard leaders for backupName={}", backupName);
 
-    ocmh.processResponses(results, shardHandler, true, "Could not backup all replicas", asyncId, requestMap);
+    ocmh.processResponses(results, shardHandler, true, "Could not backup all shards", asyncId, requestMap);
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/806d087a/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java b/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java
index c17ec3c..503eed0 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java
@@ -60,7 +60,9 @@ class BackupCoreOp implements CoreAdminHandler.CoreAdminOp {
       //  file system. Otherwise, perhaps the FS location isn't shared -- we want an error.
       if (!snapShooter.getBackupRepository().exists(snapShooter.getLocation())) {
         throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-            "Directory to contain snapshots doesn't exist: " + snapShooter.getLocation());
+            "Directory to contain snapshots doesn't exist: " + snapShooter.getLocation() + ". " +
+            "Note that Backup/Restore of a SolrCloud collection " +
+            "requires a shared file system mounted at the same path on all nodes!");
       }
       snapShooter.validateCreateSnapshot();
       snapShooter.createSnapshot();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/806d087a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc b/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
index 291b4d5..61576c7 100644
--- a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
+++ b/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
@@ -24,6 +24,8 @@ Solr provides two approaches to backing up and restoring Solr cores or collectio
 
 Support for backups when running SolrCloud is provided with the <<collections-api.adoc#collections-api,Collections API>>. This allows the backups to be generated across multiple shards, and restored to the same number of shards and replicas as the original collection.
 
+NOTE: SolrCloud Backup/Restore requires a shared file system mounted at the same path on all nodes, or HDFS.
+
 Two commands are available:
 
 * `action=BACKUP`: This command backs up Solr indexes and configurations. More information is available in the section <<collections-api.adoc#backup,Backup Collection>>.