Skip to content

Revert "Return error when remote indices are locally resolved (#74762)"#76798

Merged
jtibshirani merged 1 commit intoelastic:7.xfrom
jtibshirani:revert-ccs-check
Aug 21, 2021
Merged

Revert "Return error when remote indices are locally resolved (#74762)"#76798
jtibshirani merged 1 commit intoelastic:7.xfrom
jtibshirani:revert-ccs-check

Conversation

@jtibshirani
Copy link
Copy Markdown
Contributor

This commit is causing searches that use remote patterns like *:test to fail
with the error "Cross-cluster calls are not supported in this context but
remote indices were requested: [*:test]". I don't think this was the intention
of the original PR, which targeted APIs like 'get' that do not support
cross-cluster calls.

This is blocking release testing, so I'm reverting for now. We can re-introduce
the PR later along with a test for this search case.

@jtibshirani jtibshirani added >non-issue :Search/Search Search-related issues that do not fall into other categories v7.15.0 labels Aug 21, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Aug 21, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search (Team:Search)

Copy link
Copy Markdown
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

LGTM. Can we also mark the original PR as non-issue so it won't make into the release notes?

@jtibshirani
Copy link
Copy Markdown
Contributor Author

Will do! Thanks for reviewing.

@jtibshirani jtibshirani merged commit 0413333 into elastic:7.x Aug 21, 2021
@jtibshirani jtibshirani deleted the revert-ccs-check branch August 21, 2021 16:31
jtibshirani added a commit that referenced this pull request Aug 21, 2021
@jtibshirani
Copy link
Copy Markdown
Contributor Author

Pinging @javanna @jimczi so you know we reverted this. I wasn't able to figure out a good self-contained fix.

@javanna
Copy link
Copy Markdown
Contributor

javanna commented Jan 11, 2022

Thanks for taking care of this @jtibshirani . I did some digging and I understand better what happened. In our main branch any remote cluster expression will be intercepted and converted directly when resolving remote cluster names, hence such expressions won't ever make it to the index name expression resolver which resolves local indices names.

In our 7.x branches though, we still account for indices created in 6.x that may contain a :, hence if a remote cluster expression does not resolve to any remote cluster it ends up being treated as a local expression. What I have missed in my original PR is a test without remote clusters configured or with a remote cluster expressions that would not match any configured remote cluster. In those two scenarios the search API would also be affected by the error that was only intended for API that don't support executing against remote clusters.

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

Labels

>non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.15.0 v7.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants