mirror of https://github.com/apache/lucene.git
SOLR-10397: Overseer.createAutoscalingTriggerIfNotExist() should log error instead of throwing SolrException
This commit is contained in:
parent
6f8ca53b3c
commit
6893699f06
|
@ -599,11 +599,14 @@ public class Overseer implements Closeable {
|
||||||
request.getContext().put("httpMethod", "POST");
|
request.getContext().put("httpMethod", "POST");
|
||||||
request.setContentStreams(Collections.singleton(new ContentStreamBase.StringStream(dsl)));
|
request.setContentStreams(Collections.singleton(new ContentStreamBase.StringStream(dsl)));
|
||||||
SolrQueryResponse response = new SolrQueryResponse();
|
SolrQueryResponse response = new SolrQueryResponse();
|
||||||
|
try {
|
||||||
getZkController().getCoreContainer()
|
getZkController().getCoreContainer()
|
||||||
.getRequestHandler(AutoScalingHandler.HANDLER_PATH).handleRequest(request, response);
|
.getRequestHandler(AutoScalingHandler.HANDLER_PATH).handleRequest(request, response);
|
||||||
if (!"success".equals(response.getValues().get("result"))) {
|
if (!"success".equals(response.getValues().get("result"))) {
|
||||||
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
|
log.error("Failed when creating .auto_add_replicas trigger, return {}",response);
|
||||||
"Failed when creating .auto_add_replicas trigger, return " + response);
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Failed when creating .auto_add_replicas trigger ", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue