lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject lucene-solr:jira/solr-11458-2: SOLR-11458: Add "failure" to results before proceeding with rollback.
Date Fri, 10 Nov 2017 09:35:44 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-11458-2 7ccf122de -> 91c9c6b93


SOLR-11458: Add "failure" to results before proceeding with rollback.


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

Branch: refs/heads/jira/solr-11458-2
Commit: 91c9c6b9377e02225592cd8c15f0830e282bde90
Parents: 7ccf122
Author: Andrzej Bialecki <ab@apache.org>
Authored: Fri Nov 10 10:35:02 2017 +0100
Committer: Andrzej Bialecki <ab@apache.org>
Committed: Fri Nov 10 10:35:02 2017 +0100

----------------------------------------------------------------------
 solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/91c9c6b9/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java b/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
index 5149c47..a4e06ee 100644
--- a/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
@@ -184,7 +184,10 @@ public class MoveReplicaCmd implements Cmd{
     try {
       ocmh.addReplica(ocmh.zkStateReader.getClusterState(), addReplicasProps, addResult,
null);
     } catch (Exception e) {
-      // fatal error - try rolling back?
+      // fatal error - try rolling back
+      String errorString = String.format(Locale.ROOT, "Failed to create replica for collection=%s
shard=%s" +
+          " on node=%s, failure=%s", coll.getName(), slice.getName(), targetNode, addResult.get("failure"));
+      results.add("failure", errorString);
       log.warn("Error adding replica " + addReplicasProps + " - trying to roll back...",
e);
       addReplicasProps = addReplicasProps.plus(CoreAdminParams.NODE, replica.getNodeName());
       NamedList rollback = new NamedList();


Mime
View raw message