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

Search of remote clusters with no shards results in successful status. #100354

Conversation

quux00
Copy link
Contributor

@quux00 quux00 commented Oct 5, 2023

ccs_minimize_roundtrips=true was not checking if no shards were present to
search before setting the cluster search status. If number of shards is zero,
then cluster search status should be successful. This aligns ccs_minimize_roundtrips=true
with the false setting and how it worked in earlier versions.

Fixes bug #100350

ccs_minimize_roundtrips=true was not checking if no shards were present to search
before setting the cluster search status. If number of shards is zero, then cluster
search status should be zero. This aligns ccs_minimize_roundtrips=true with the
false setting and how it worked in earlier versions.

Fixes bug elastic#100350
@quux00 quux00 added >bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.12.0 labels Oct 5, 2023
@quux00 quux00 requested review from javanna and piergm October 5, 2023 17:05
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @quux00, I've created a changelog YAML for you.

@tylerperk
Copy link

@quux00 Can we backport this to the next 8.10 and 8.11 patches?

Copy link
Member

@piergm piergm left a comment

Choose a reason for hiding this comment

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

LGTM!

@droberts195 droberts195 added v8.11.0 v8.10.4 auto-backport-and-merge Automatically create backport pull requests and merge when ready labels Oct 6, 2023
@droberts195
Copy link
Contributor

Since this problem has such a big impact on ML datafeeds used within a large CCS environment I propose that this fix should be backported to 8.11 and 8.10. I've added the relevant labels, so if the changes backport cleanly hopefully this will involve no extra effort. Let me know if you disagree.

@quux00 quux00 merged commit a708501 into elastic:main Oct 6, 2023
12 checks passed
quux00 added a commit to quux00/elasticsearch that referenced this pull request Oct 6, 2023
elastic#100354)

ccs_minimize_roundtrips=true was not checking if no shards were present to search
before setting the cluster search status. If the number of shards is zero, then cluster
search status should be 'successful'. This aligns ccs_minimize_roundtrips=true with the
false setting and how it worked in earlier versions.

Fixes bug elastic#100350
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.11
8.10 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 100354

quux00 added a commit to quux00/elasticsearch that referenced this pull request Oct 6, 2023
elastic#100354)

ccs_minimize_roundtrips=true was not checking if no shards were present to search
before setting the cluster search status. If the number of shards is zero, then cluster
search status should be 'successful'. This aligns ccs_minimize_roundtrips=true with the
false setting and how it worked in earlier versions.

Fixes bug elastic#100350
elasticsearchmachine pushed a commit that referenced this pull request Oct 6, 2023
#100354) (#100442)

ccs_minimize_roundtrips=true was not checking if no shards were present to search
before setting the cluster search status. If the number of shards is zero, then cluster
search status should be 'successful'. This aligns ccs_minimize_roundtrips=true with the
false setting and how it worked in earlier versions.

Fixes bug #100350
quux00 added a commit to quux00/elasticsearch that referenced this pull request Oct 6, 2023
elastic#100354)

ccs_minimize_roundtrips=true was not checking if no shards were present to search
before setting the cluster search status. If the number of shards is zero, then cluster
search status should be 'successful'. This aligns ccs_minimize_roundtrips=true with the
false setting and how it worked in earlier versions.

Fixes bug elastic#100350
@quux00
Copy link
Contributor Author

quux00 commented Oct 6, 2023

Manual backport to 8.10 here: #100458

quux00 added a commit that referenced this pull request Oct 6, 2023
#100354) (#100458)

ccs_minimize_roundtrips=true was not checking if no shards were present to search
before setting the cluster search status. If the number of shards is zero, then cluster
search status should be 'successful'. This aligns ccs_minimize_roundtrips=true with the
false setting and how it worked in earlier versions.

Backported from #100354 

Fixes bug #100350
@quux00
Copy link
Contributor Author

quux00 commented Oct 6, 2023

The 8.11 and 8.10 backports have been completed, so it should be in ES releases for 8.10.4 and 8.11.1 and 8.12.0.

@andreidan
Copy link
Contributor

Removing backport pending as this was backported to 8.10 with #100458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready >bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.10.4 v8.11.0 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants