Skip to content

Fixing test failure #127657 #127659

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

Merged
merged 2 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,6 @@ tests:
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT
method: test {rerank.Reranker using another sort order ASYNC}
issue: https://github.com/elastic/elasticsearch/issues/127638
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapperTests
method: testRescoreVectorOldIndexVersion
issue: https://github.com/elastic/elasticsearch/issues/127657
- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT
method: testCancellationViaTimeoutWithAllowPartialResultsSetToFalse
issue: https://github.com/elastic/elasticsearch/issues/127096
Expand All @@ -460,6 +457,7 @@ tests:
method: testRollover
issue: https://github.com/elastic/elasticsearch/issues/127692


# Examples:
#
# Mute a single test case in a YAML test suite:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -904,14 +904,17 @@ public void testRescoreVectorForNonQuantized() {
}

public void testRescoreVectorOldIndexVersion() {
IndexVersion incompatibleVersion = IndexVersionUtils.randomVersionBetween(
random(),
IndexVersion incompatibleVersion = randomFrom(
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand what this is trying to do but it looks a bit confusing to me. Why not the below:

IndexVersionUtils.randomVersionBetween(
  random(),
  Version::min(IndexVersionUtils.getLowestReadCompatibleVersion(), IndexVersions.UPGRADE_TO_LUCENE_10_0_0)
  Version::max(IndexVersionUtils.getPreviousVersion(IndexVersions.ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS_BACKPORT_8_X), IndexVersionUtils.getPreviousVersion(IndexVersions.ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS))
)

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem with this is that if somebody adds a new index version for 8.x that is after ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS_BACKPORT_8_X, it will have the version capability, but will be a version smaller than ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS.

This is why its a disjoint version set.

IndexVersionUtils.randomVersionBetween(
random(),
IndexVersionUtils.getLowestReadCompatibleVersion(),
IndexVersionUtils.getPreviousVersion(IndexVersions.ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS_BACKPORT_8_X)
),
IndexVersionUtils.getPreviousVersion(IndexVersions.ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS)
IndexVersionUtils.randomVersionBetween(
random(),
IndexVersions.UPGRADE_TO_LUCENE_10_0_0,
IndexVersionUtils.getPreviousVersion(IndexVersions.ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS)
)
);
for (String indexType : List.of("int8_hnsw", "int8_flat", "int4_hnsw", "int4_flat", "bbq_hnsw", "bbq_flat")) {
expectThrows(
Expand Down