mirror of
https://github.com/apache/lucene.git
synced 2025-03-08 17:49:29 +00:00
SOLR-12187: ZkStateReader.Notification thread should only catch Exception
This commit is contained in:
parent
8c60be4489
commit
1d2441441b
@ -28,6 +28,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
|
||||
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||
@ -309,16 +310,17 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
|
||||
ZkContainer.testing_beforeRegisterInZk = null;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
TimeOut timeOut = new TimeOut(30, TimeUnit.SECONDS, TimeSource.NANO_TIME);
|
||||
timeOut.waitFor("Timeout adding replica to shard", () -> {
|
||||
try {
|
||||
CollectionAdminRequest.addReplicaToShard(collectionName, "shard1")
|
||||
.process(cluster.getSolrClient());
|
||||
break;
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
// expected, when the node is not fully started
|
||||
Thread.sleep(500);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
waitForState("Expected 1x2 collections", collectionName, clusterShape(1, 2));
|
||||
|
||||
String leaderJettyNodeName = leaderJetty.getNodeName();
|
||||
|
@ -1626,8 +1626,8 @@ public class ZkStateReader implements Closeable {
|
||||
if (watcher.onStateChanged(liveNodes, collectionState)) {
|
||||
removeCollectionStateWatcher(collection, watcher);
|
||||
}
|
||||
} catch (Throwable throwable) {
|
||||
LOG.warn("Error on calling watcher", throwable);
|
||||
} catch (Exception exception) {
|
||||
LOG.warn("Error on calling watcher", exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user