serhiy-bzhezytskyy commented on PR #4632:
URL: https://github.com/apache/solr/pull/4632#issuecomment-4962150408

   Split the handler into two callbacks, per your suggestion. `onError(ex, ids, 
collection)` reports the failed document ids and stays the lambda target. A 
default `onError(ex)` handles errors not tied to specific documents (e.g. a 
failure before any doc was sent) — it logs by default, so a registered handler 
can't silently swallow those. That was the hole in the single-method version: 
with an empty id list a lambda user got nothing. No subclassing needed for 
either.
   
   Two smaller things from earlier:
   - `SentStream` is public now instead of the factory — a protected record 
constructor isn't reachable from the Jetty client's package, and public is 
simpler than the workaround.
   - id extraction stayed on the handler as `idOf(doc)` so callers with a 
different uniqueKey can override it without subclassing the client. Renamed the 
client-side helper to `idsForErrorReporting` so it reads as what it does — and 
documents that it's empty when no handler is registered (documents are never 
read on the default path).
   
   Both transport suites are green.
   


-- 
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]

Reply via email to