Closed dspasojevic closed 9 years ago
Good spot @dspasojevic Absolutely the search scroll id
should have a further keep alive on it.
PR most welcome!
@dspasojevic how did you find the streams implementation overall?
I've published 1.6.6 which has this fix and another relating to streams.
Hi,
I'm investigating an issue we are seeing where streamed results never complete.
I've run
ScrollPublisherIntegrationTest
locally, and it seems to have the same issue. Many more results than expected are returned. Putting some debugging incom.sksamuel.elastic4s.streams.PublishActor#PublishActor
, I see that the scroll id is flipping between null, not-null, null, etc (see the output at the bottom).I think that this is because no keep alive is specified on the PublishActor's scroll request. That seems to result in
org.elasticsearch.action.search.SearchScrollRequest#writeTo
(v1.6.0) setting the scroll flag to false.SearchScrollRequest
requires both a keep alive and a scroll id to perform the scroll and return a new scroll id.Is this a bug in elastic4s? If so, I'm happy to submit a pull request that sets the keep alive to a value supplied to the subscriber. I think that checking the result of the .await in the tests is probably also worth doing.
Thanks, -Dan
Output: