Skip to content

Conversation

@javanna
Copy link
Member

@javanna javanna commented Dec 28, 2018

With #36997 and #37000 we added the ability to provide a cluster alias with a SearchRequest and to perform non-final reduction when a cluster alias is set to the incoming search request.

With CCS soon supporting local reduction on each remote cluster, we also need to prevent shard_size of terms aggs to be adjusted on the data nodes. We may end up querying a single shard per cluster, but later we will have to reduce results coming from multiple cluster hence we still have to collect more buckets than needed to guarantee some level of precision.

This is done by adding the ability to override the shard_size on the coordinating node as part of the rewrite phase. This will be done only
when searching against multiple clusters, meaning when using CCS with alternate execution mode. Setting the shard_size explicitly on the coord node means that it will not be overridden later on the data nodes. The shard_size will still be set on the data nodes like before in all other cases (local search, or CCS with ordinary execution mode).

Relates to #32125

With elastic#36997 and elastic#37000 we added the ability to provide a cluster alias with a SearchRequest and to perform non-final reduction when a cluster alias is set to the incoming search request.

With CCS soon supporting local reduction on each remote cluster, we also need to prevent shard_size of terms aggs to be adjusted on the data nodes. We may end up querying a single shard per cluster, but later we will have to reduce results coming from multiple cluster hence we still have to collect more buckets than needed to guarantee some level of precision.

This is done by adding the ability to override the shard_size on the coordinating node as part of the rewrite phase. This will be done only
when searching against multiple clusters, meaning when using CCS with alternate execution mode. Setting the shard_size explicitly on the coord node means that it will not be overridden later on the data nodes. The shard_size will still be set on the data nodes like before in all other cases (local search, or CCS with ordinary execution mode).

 Relates to elastic#32125
@javanna javanna added >enhancement :Search/Search Search-related issues that do not fall into other categories v7.0.0 v6.7.0 labels Dec 28, 2018
@javanna javanna requested a review from jimczi December 28, 2018 15:12
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@javanna javanna force-pushed the enhancement/ccs_disable_single_shard_size branch from 18f814e to 705f28c Compare December 28, 2018 15:12
@javanna
Copy link
Member Author

javanna commented Dec 28, 2018

run gradle build tests 2

@javanna
Copy link
Member Author

javanna commented Dec 31, 2018

This was one of the possible solutions. We decided to take another route: remove this single shard size optimization. Another PR will come soon. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search/Search Search-related issues that do not fall into other categories v6.7.0 v7.0.0-beta1 WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants