Forward kwargs from scan helper to scroll method as well. #321
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description
I've called
elasticsearch.helpers.reindexwith a customrequest_timeoutpresent in bothscan_kwargsandbulk_kwargs. But that's not sent down toclient.scrollwhich would send it toself.transport.perform_requestwhich would then use it.The first call from
scanhelper does forward the**kwargs:client.search(body=query, scroll=scroll, **kwargs), so I'd sayclient.scrollshould as well. Because this wasn't happening, I eventually got a timeout near the end of a huge reindexing with the below output, even though I supplied arequest_timeout=600.Later edit
I saw the failing tests,
**kwargswasn't thought as being forwarded onscroll. And adding an inline case for forwarding onlyrequest_timeoutthere is a hack. But I was trying to make use of the fact that it's gonna be added to params in here. If there's an easy fix here I'd appreciate a suggestion though.