New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data.search] Send ccs_minimize_roundtrips=true for async search requests #159848
[data.search] Send ccs_minimize_roundtrips=true for async search requests #159848
Conversation
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
@@ -50,6 +51,8 @@ export async function getDefaultAsyncSubmitParams( | |||
return { | |||
// TODO: adjust for partial results | |||
batched_reduce_size: searchConfig.asyncSearch.batchedReduceSize, | |||
// Decreases delays due to network when using CCS | |||
ccs_minimize_roundtrips: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QQ: if I understand correctly it should be set to true to decrease delays?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. I believe Kibana wants to set it to true
from now on: #159706
The change on the ES side (elastic/elasticsearch#96012) now supports minimizing round trips with async_search, but still leaves ccs_minimize_rountrips=false
as the default.
…n/kibana into search/ccs_minimize_roundtrips
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @lukasolson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in Discover in a cloud deployment, and everything seems to be working as expected. LGTM 👍
@lukasolson One consideration here is that prior to merging elastic/elasticsearch#96012, Elasticsearch does not support Some more details on that As long as the querying cluster coordinator you are sending the _async_search CCS query to supports the However, if Kibana sends So if customers can run a mixed version system where Kibana is on say 8.9.0 and the ES coordinator receiving the query is on 8.8.0, then the Kibana code would need to build in logic to check the version of the coordinator (maybe with Here's the error you will get:
|
@quux00 Correct me if I'm wrong, but we don't have any way to know which remote CCS clusters we're hitting when sending a search. In the past, this sort of thing has been handled internally by ES, which correctly forwards (or doesn't forward) certain parameters to remote clusters running a previous version. Is this something that can be done? |
Here's an example of when ES implemented a parameter as a no-op for BWC: elastic/elasticsearch#82744 |
For this flag with CCS, Kibana only needs to be concerned with the version of the ES coordinator - meaning the ES node that Kibana is connecting to issue the search request. The parsing of the "ccs_minimize_roundtrips" flag (and then deciding whether to minimize roundtrips) is done on the coordinator node only. After that it is just a "normal" search on each shard and is fully backwards compatible with all of the nodes the coordinator sends the search request to (both nodes of the same cluster and remote clusters), even if they are of older versions. I don't know how Kibana works in terms of selecting a coordinator (whether it always uses the same one or does a round robin among nodes of a cluster). If you always connect to the same coordinator, you could perhaps cache the ES version and decide whether it is safe to send
Reading over this one, this looks like the opposite scenario. In that case, a flag that had some action in older versions become a "no-op" in a newer version so the newer version of ES could just write some code to ignore it. In the |
Bottom line: there is no problem when it comes to CCS with supporting If the coordinating cluster is a mixed version cluster, we rely on the fact that Kibana is on the lowest version of all nodes, and that it is upgraded last. If this rule of thumb is followed, no special handling is necessary within Kibana. If Kibana on a version that's higher than some of the nodes in the coordinating cluster, all bets are off, but that is in general, not only for this specific change. |
Hey @lukasolson, under Observability, the Alerts table can't load the alerts when Any suggestions to fix this? I'm using oblt-edge |
@fkanout What version of ES are you using? |
I'm using |
This change will only be in 8.9+, which will only be compatible with ES 8.9+. |
Summary
Resolves #159706. Sends
ccs_minimize_roundtrips=true
for async search requests to decrease network delays when cross-cluster search is at play.Checklist
For maintainers