-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abort sorting in case of local agg sort queue overflow (#65687)
In case the local agg sorter queue gets full and no limit has been provided, the local sorter will now erroneously call the failure callback for every single row in the original rowset that's left over the local queue limit (instead for just the first one). The failure response is dispatched in any case, so this is relatively harmless. The sorter continues iterating on the original response fetching subsequent pages. In case of correct Elasticsearch behaviour, this is also harmless, it'll just trigger a number of internal exceptions. However, in case of a pagination defect in Elasticsearch (like GH#65685, where the same search_after is returned), this will result in an effective spin loop, potentially rendering eventually the node unresponsive. This PR simply breaks both the inner loop iterating over the current unsorted rowset, as well as the outer one, iterating over the left pages. It also fixes an outdated documentation limitation. (cherry picked from commit 638402c)
- Loading branch information
Showing
3 changed files
with
108 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters