allthingssecurity commented on PR #30980:
URL: https://github.com/apache/camel/pull/30980#issuecomment-7221495542

   Thanks Claus, done in f1f61f90 (and main merged in since):
   
   1. `hasNext()` now calls `close()` when the next scroll page comes back 
empty. That sends the clear-scroll request and, with `disconnect=true`, closes 
the client. A failed clear-scroll at that point is logged at WARN, and 
`close()` marks the iterator closed even when clear-scroll fails, so 
`hasNext()` sends no further scroll request. The doc page says to close an 
iterator that is left before its end. A new test reads a scroll to the end 
without `close()` (it fails without the change).
   2. Added an upgrade guide entry for the failure without `hostAddresses` or a 
component `client`: the producer fails when it starts (with 
`lazyStartProducer=true`, on its first exchange).
   3. There is no sibling ticket yet. camel-opensearch has the same gaps: the 
cleanup runs only in the `thenAccept` chain (`OpensearchProducer.java:429`), so 
a failed request keeps the option headers and, with `disconnect=true`, leaks 
the client; `useScroll` with `disconnect=true` closes the client right after 
the first search; `sniffAfterFailureDelay` has no `SniffOnFailureListener`, so 
it does nothing; and the start check only logs a WARN. Opensearch has no 
document-only mode, so that point does not apply. I can file a JIRA and fix it 
in a follow-up PR.
   
   Merging main (#30954): I kept its texts, except `sniffAfterFailureDelay` (no 
longer "no effect", as this PR adds the listener) and `disconnect` (with 
`useScroll` the client is closed when the iterator is closed).
   


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

Reply via email to