Repository navigation
opensearch-java: fix the search_after values sent by HybridSpout - #2237
Merged
Merged
Conversation
HybridSpout passed the toString() of the FieldValue sort values to search_after, so OpenSearch rejected every queue reload when sorting on a date field. Signed-off-by: Davide Polato <dpol1@apache.org>
jnioche
reviewed
Oct 13, 2026
jnioche
left a comment
Contributor
There was a problem hiding this comment.
the fix itself looks very straightforward
I am not sure this warrants a test though. We want to strike the right balance between testing for what really matters and have too many tests - which makes building slower etc...
Made a similar call in #2235
Contributor
Author
|
Fair enough, removed it. On build time, |
jnioche
approved these changes
Oct 13, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I hit this while comparing the two OpenSearch modules for #2212. With the
opensearch.status.bucket.sort.fieldof the sample configuration (nextFetchDate,url), every query HybridSpout sends to reload a queue fails withException with OpenSearch query. The root cause in the OpenSearch response is:The spout then emits only the URLs returned by the aggregations. HybridSpout keeps the sort values as
FieldValueobjects and was sending theirtoString()insearch_after. 3.6.0 and 3.7.0 are affected. The legacyopensearchmodule passes the sort values as they are and is not affected.The new
HybridSpoutTestputs three URLs in one queue and reads one URL per query, so the second and third come from reloads. It expects all three; on main it gets only the first.