serhiy-bzhezytskyy commented on code in PR #4632:
URL: https://github.com/apache/solr/pull/4632#discussion_r3565592674
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateBaseSolrClient.java:
##########
@@ -544,6 +573,24 @@ public void handleError(Throwable ex) {
log.error("error", ex);
}
+ /**
+ * Called when an error occurs sending a batch, with the {@link Update} that
failed. The default
+ * implementation invokes the {@link UpdateErrorHandler} registered via
{@link
+ * Builder#withErrorHandler} if one was provided (passing the failed request
and its documents),
+ * and otherwise falls back to {@link #handleError(Throwable)}. Subclasses
may still override this
+ * to recover the documents that did not reach the server. See SOLR-3284.
+ *
+ * @param ex the error that occurred
+ * @param update the update (request + collection) that failed to send; may
be null
+ */
+ public void handleError(Throwable ex, Update update) {
Review Comment:
Follow-up — correcting myself, made it private. The 2-arg
handleError(Throwable, Update) is really just internal dispatch: if an
errorHandler is registered call it, else fall back to handleError(Throwable).
There's no behavior in it worth overriding — subclassers already have
handleError(Throwable), and callers now have the lambda. Keeping the bridge
private means one subclass hook and one injection point, rather than a second
overridable error method with murky precedence between them. And if the handler
is heading toward being the preferred mechanism, I'd rather not open a new
subclass surface on the way 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]