Skip to content
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

Clarify RemoteClusterService#groupIndices behaviour #33899

Merged
merged 2 commits into from
Sep 24, 2018

Conversation

javanna
Copy link
Member

@javanna javanna commented Sep 20, 2018

When executing a cross-cluster search, we need to search against all local indices (and no remote indices) in case no indices are specified. Also, if only remote indices are specified, no local indices will be queried. We previously added empty local indices whenever they were not present in the map of the grouped indices, then we would act differently later based on the extracted remote indices. Instead, we now add the empty array for local indices only in case we need to search all local indices; the entry for local indices is not added when local indices should not be searched. This way the grouped indices reflect reality and provide a better indication of what indices will be searched.

When executing a cross-cluster search, we need to search against all local indices (and no remote indices) in case no indices are specified. Also, if only remote indices are specified, no local indices will be queried. We previously added empty local indices whenever they were not present in the map of the grouped indices, then we would act differently later based on the extracted remote indices. Instead, we now add the empty array for local indices only in case we need to search all local indices; the entry for local indices is not added when local indices should not be searched. This way the grouped indices reflect reality and provide a better indication of what indices will be searched.
@javanna javanna added >enhancement review :Search/Search Search-related issues that do not fall into other categories v7.0.0 v6.5.0 labels Sep 20, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@javanna javanna changed the title Clarify RemoteClusterService#groupIndices behaviour around local indices Clarify RemoteClusterService#groupIndices behaviour Sep 20, 2018
@javanna
Copy link
Member Author

javanna commented Sep 21, 2018

retest this please

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@javanna
Copy link
Member Author

javanna commented Sep 24, 2018

thanks @jimczi !

@javanna javanna merged commit e389d9e into elastic:master Sep 24, 2018
@javanna
Copy link
Member Author

javanna commented Sep 24, 2018

cc @martijnvg I double checked and I think this change does not affect CCR as it modifies RemoteClusterService#groupIndices rather than RemoteClusterAware#groupClusterIndices which is called by both groupIndices and CCR. So the green tests were not a lie ;)

javanna added a commit that referenced this pull request Sep 25, 2018
When executing a cross-cluster search, we need to search against all local indices (and no remote indices) in case no indices are specified. Also, if only remote indices are specified, no local indices will be queried. We previously added empty local indices whenever they were not present in the map of the grouped indices, then we would act differently later based on the extracted remote indices. Instead, we now add the empty array for local indices only in case we need to search all local indices; the entry for local indices is not added when local indices should not be searched. This way the grouped indices reflect reality and provide a better indication of what indices will be searched.
kcm pushed a commit that referenced this pull request Oct 30, 2018
When executing a cross-cluster search, we need to search against all local indices (and no remote indices) in case no indices are specified. Also, if only remote indices are specified, no local indices will be queried. We previously added empty local indices whenever they were not present in the map of the grouped indices, then we would act differently later based on the extracted remote indices. Instead, we now add the empty array for local indices only in case we need to search all local indices; the entry for local indices is not added when local indices should not be searched. This way the grouped indices reflect reality and provide a better indication of what indices will be searched.
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.5.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants