Skip to content

Conversation

@benchaplin
Copy link
Contributor

@benchaplin benchaplin commented Nov 14, 2025

This is a backport of #135873.

#137687 / #137681 popped up as a result of my backporting #136889 to 9.1/9.2.

The reason for the failure is because I added a second transport version behind the BATCHED_QUERY_PHASE_FEATURE_FLAG. Once there is more than one transport version, it is possible for the CCS proxy node discrepancy to occur. Hence we need this change backported.

javanna and others added 3 commits November 13, 2025 23:26
…ode (elastic#135873)

elastic#127112 introduced `BytesTransportResponse` to be used in search batched execution, so that `NodeQueryResponse` could be written as `BytesTransportResponse` as opposed to materializing the response object on heap.

When a proxy node acts as a proxy to query its local data, and the coordinating node is on a different version than the proxy node, the response will fail to deserialize in the coord node because it was written with the version of the proxy node as opposed to that of the coord (target) node. This is because `DirectResponseChannel` skips the step of reading and writing back such response, which would lead to it being converted to the right format.

This commit attempts to fix this problem by tracking the version used to write the binary response, and conditionally converting it in the `ProxyRequestHandler` when the version don't align.
@benchaplin benchaplin added >bug backport Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch :Search Foundations/Search Catch all for Search Foundations labels Nov 14, 2025
@benchaplin benchaplin changed the title Convert BytesTransportResponse when proxying response from/to local node (#135873) [9.1] Convert BytesTransportResponse when proxying response from/to local node (#135873) Nov 14, 2025
@benchaplin benchaplin added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) and removed auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Nov 14, 2025
@benchaplin benchaplin merged commit f729c64 into elastic:9.1 Nov 17, 2025
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport >bug :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.1.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants