thelabdude commented on a change in pull request #133:
URL: https://github.com/apache/solr/pull/133#discussion_r635677638



##########
File path: solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
##########
@@ -258,6 +260,37 @@ public void testAddDocs() throws Exception {
     assertUlogPresence(docCollection);
   }
 
+  private List<Replica> restartPullReplica(DocCollection docCollection, int 
numPullReplicas) throws Exception {
+    Slice s = docCollection.getSlices().iterator().next();
+    List<Replica> pullReplicas = s.getReplicas(EnumSet.of(Replica.Type.PULL));
+    // make sure a PULL replica recovers this first doc after a restart
+    JettySolrRunner leaderJetty = cluster.getReplicaJetty(s.getLeader());
+
+    // find a node with a PULL replica that's not hosting the leader
+    JettySolrRunner replicaJetty = null;
+    for (Replica r : pullReplicas) {
+      JettySolrRunner jetty = cluster.getReplicaJetty(r);
+      if (!jetty.getNodeName().equals(leaderJetty.getNodeName())) {
+        replicaJetty = jetty;
+        break;
+      }
+    }
+
+    // stop / start the node with a pull replica
+    if (replicaJetty != null) {

Review comment:
       Thanks @TomMD  ... couldn't figure out what it was complaining about 
there ;-)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to