tflobbe commented on a change in pull request #2115:
URL: https://github.com/apache/lucene-solr/pull/2115#discussion_r534702097



##########
File path: 
solr/core/src/test/org/apache/solr/cloud/TestPullReplicaErrorHandling.java
##########
@@ -236,8 +237,9 @@ public void testCloseHooksDeletedOnReconnect() throws 
Exception {
     JettySolrRunner jetty = 
getJettyForReplica(s.getReplicas(EnumSet.of(Replica.Type.PULL)).get(0));
     SolrCore core = jetty.getCoreContainer().getCores().iterator().next();
 
-    for (int i = 0; i < 5; i++) {
+    for (int i = 0; i < (TEST_NIGHTLY ? 5 : 2); i++) {
       cluster.expireZkSession(jetty);
+      waitForState("Expecting node to be disconnected", collectionName, 
activeReplicaCount(1, 0, 0));

Review comment:
       > There is a window where live node has gone away but state is still 
active because it hasn't updated yet. 
   
   Have you seen that happening? AFAIK, everywhere that we check if a replica 
is active we look at the state and the live nodes.
   > if we're just waiting for and watching live nodes, then we can see that go 
away and complete the test before the cluster has quiesced.
   
   We would still have the check in line 243, right? My point was:
   1) wait to see a change in live nodes
   2) wait for active (line 243 as it is now)
   
   Wouldn't that be safe (assuming no other, unrelated node dies just at this 
point)?
   
   > There is still a different race here that the replica could go down and 
come back up before we start waiting for it to be down the first time
   
   Right, that's the one I was concerned about. Difficult to happen, but...




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to