Skip to content

Fix BwC synonyms tests#118691

Merged
carlosdelest merged 2 commits intoelastic:mainfrom
carlosdelest:fix/synonyms-fix-bwc
Dec 17, 2024
Merged

Fix BwC synonyms tests#118691
carlosdelest merged 2 commits intoelastic:mainfrom
carlosdelest:fix/synonyms-fix-bwc

Conversation

@carlosdelest
Copy link
Member

@carlosdelest carlosdelest commented Dec 13, 2024

Closes #116777

BwC tests can't work with synonyms correctly, as auto expand replicas 0-all in the synonyms system index means that not all replicas will be available for the synonyms index when upgrading nodes to create a mixed cluster.

This makes some shard update failure in the synonyms operations as there can be race conditions on the update operations for shards that are marked as relocating. I haven't found a way to consistently deal with this on BwC on reload operations.

This PR creates two different tests for reloading synonyms, in which different conditions are checked. The conditions that fail in BwC are added to a test that is skipped in BwC. This way we have some coverage for both BwC and non-BwC tests, and we check all conditions needed in non-BwC tests.

When we have auto-expand replicas set to 0-1 in synonyms system index, this can be reverted. That is tracked in #115382

@carlosdelest carlosdelest added >test Issues or PRs that are addressing/adding tests :Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Dec 13, 2024
@carlosdelest carlosdelest added auto-backport Automatically create backport pull requests when merged v8.16.0 v8.17.0 v8.15.0 v8.18.0 labels Dec 16, 2024
@carlosdelest carlosdelest marked this pull request as ready for review December 16, 2024 07:16
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@john-wagster john-wagster left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.15 Commit could not be cherrypicked due to conflicts
8.16 Commit could not be cherrypicked due to conflicts
8.17 Commit could not be cherrypicked due to conflicts
8.x Commit could not be cherrypicked due to conflicts

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

carlosdelest added a commit to carlosdelest/elasticsearch that referenced this pull request Dec 17, 2024
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
carlosdelest added a commit to carlosdelest/elasticsearch that referenced this pull request Dec 17, 2024
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
carlosdelest added a commit to carlosdelest/elasticsearch that referenced this pull request Dec 17, 2024
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml
@carlosdelest
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.x
8.17
8.16
8.15

Questions ?

Please refer to the Backport tool documentation

carlosdelest added a commit to carlosdelest/elasticsearch that referenced this pull request Dec 17, 2024
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml
elasticsearchmachine pushed a commit that referenced this pull request Dec 17, 2024
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml
elasticsearchmachine pushed a commit that referenced this pull request Dec 17, 2024
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
elasticsearchmachine pushed a commit that referenced this pull request Dec 17, 2024
* Fix BwC  synonyms tests (#118691)

(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml

* Fix merge

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
… time (#118925)

Closes #116777

This test failed on 8.x due to the inability to merge the backport for
#118691 in 8.17
(#118818) as it was blocked
by an unrelated test failure.
sarog pushed a commit to portsbuild/elasticsearch that referenced this pull request Jan 22, 2025
(cherry picked from commit d09d57d)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged backport pending :Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch >test Issues or PRs that are addressing/adding tests v8.15.0 v8.16.0 v8.17.0 v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] MixedClusterClientYamlTestSuiteIT test {p0=synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set} failing

3 participants