mirror of https://github.com/apache/lucene.git
SOLR-11702: Remove old LIR call in SolrCmdDistributor and let DistributedUpdateProcessor handle it on finish()
This commit is contained in:
parent
23aee00213
commit
f1ce5419ee
|
@ -278,24 +278,14 @@ public class SolrCmdDistributor implements Closeable {
|
|||
try (HttpSolrClient client = new HttpSolrClient.Builder(req.node.getUrl()).withHttpClient(clients.getHttpClient()).build()) {
|
||||
client.request(req.uReq);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
// if false, then the node is probably not "live" anymore
|
||||
// and we do not need to send a recovery message
|
||||
Throwable rootCause = SolrException.getRootCause(e);
|
||||
log.error("Setting up to try to start recovery on replica {}", req.node.getUrl(), rootCause);
|
||||
req.cmd.getReq().getCore().getCoreContainer().getZkController().ensureReplicaInLeaderInitiatedRecovery(
|
||||
req.cmd.getReq().getCore().getCoreContainer(),
|
||||
req.node.getCollection(),
|
||||
req.node.getShardId(),
|
||||
req.node.getNodeProps(),
|
||||
req.cmd.getReq().getCore().getCoreDescriptor(),
|
||||
false /* forcePublishState */
|
||||
);
|
||||
} catch (Exception exc) {
|
||||
Throwable setLirZnodeFailedCause = SolrException.getRootCause(exc);
|
||||
log.error("Leader failed to set replica " +
|
||||
req.node.getUrl() + " state to DOWN due to: " + setLirZnodeFailedCause, setLirZnodeFailedCause);
|
||||
SolrException.log(log, e);
|
||||
Error error = new Error();
|
||||
error.e = e;
|
||||
error.req = req;
|
||||
if (e instanceof SolrException) {
|
||||
error.statusCode = ((SolrException) e).code();
|
||||
}
|
||||
errors.add(error);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -882,6 +882,8 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
|
|||
log.warn("Core "+cloudDesc.getCoreNodeName()+" belonging to "+collection+" "+
|
||||
shardId+", does not have error'd node " + stdNode.getNodeProps().getCoreUrl() + " as a replica. " +
|
||||
"No request recovery command will be sent!");
|
||||
// some replicas did not receive the updates, exception must be notified to clients
|
||||
errorsForClient.add(error);
|
||||
} else {
|
||||
log.warn("Core " + cloudDesc.getCoreNodeName() + " is no longer the leader for " + collection + " "
|
||||
+ shardId + " or we tried to put ourself into LIR, no request recovery command will be sent!");
|
||||
|
|
Loading…
Reference in New Issue