From e034edefe21194b4377eddad1ca5ee6c209f9db9 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 26 Aug 2025 12:23:35 -0600 Subject: [PATCH 1/2] Use safe double range to test long mapper (#133423) Until https://github.com/elastic/elasticsearch/issues/132893 is fixed this sounds like the best way to handle it. (cherry picked from commit 8f424781dfe8dc42a6aa9c536677a7745e736ee7) # Conflicts: # muted-tests.yml # server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java --- muted-tests.yml | 134 +++++++++++++++++- .../index/mapper/LongFieldMapperTests.java | 7 +- 2 files changed, 135 insertions(+), 6 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 4312f1f197cd7..289f6feb4db60 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -439,10 +439,136 @@ tests: issue: https://github.com/elastic/elasticsearch/issues/133234 - class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest method: latest files cannot change base id - issue: https://github.com/elastic/elasticsearch/issues/133231 -- class: org.elasticsearch.packaging.test.DockerTests - method: test072RunEsAsDifferentUserAndGroup - issue: https://github.com/elastic/elasticsearch/issues/131412 + issue: https://github.com/elastic/elasticsearch/issues/133132 +- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest + method: definitions have primary ids which cannot change + issue: https://github.com/elastic/elasticsearch/issues/133131 +- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT + method: testGroupBySubset + issue: https://github.com/elastic/elasticsearch/issues/133220 +- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT + method: testGroupByNothing + issue: https://github.com/elastic/elasticsearch/issues/133225 +- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest + method: named and unreferenced definitions cannot have the same name + issue: https://github.com/elastic/elasticsearch/issues/133255 +- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest + method: unreferenced definitions can have primary ids that are patches + issue: https://github.com/elastic/elasticsearch/issues/133256 +- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest + method: latest can refer to an unreferenced definition + issue: https://github.com/elastic/elasticsearch/issues/133257 +- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT + method: test {p0=search.vectors/100_knn_nested_search/nested kNN search inner_hits & profiling} + issue: https://github.com/elastic/elasticsearch/issues/133273 +- class: org.elasticsearch.xpack.security.authc.AuthenticationServiceTests + method: testInvalidToken + issue: https://github.com/elastic/elasticsearch/issues/133328 +- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT + method: test {p0=search/160_exists_query/Test exists query on unmapped byte field} + issue: https://github.com/elastic/elasticsearch/issues/133331 +- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT + method: test {csv-spec:change_point.Values null column} + issue: https://github.com/elastic/elasticsearch/issues/133334 +- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT + method: test {p0=search/110_field_collapsing/field collapsing} + issue: https://github.com/elastic/elasticsearch/issues/133361 +- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT + method: test {csv-spec:spatial.ConvertFromStringParseError} + issue: https://github.com/elastic/elasticsearch/issues/133364 +- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT + method: testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips + issue: https://github.com/elastic/elasticsearch/issues/127302 +- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT + method: testCCSClusterDetailsWhereAllShardsSkippedInCanMatch + issue: https://github.com/elastic/elasticsearch/issues/133370 +- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT + method: test {p0=search.vectors/42_knn_search_int4_flat/kNN search with filter} + issue: https://github.com/elastic/elasticsearch/issues/133420 +- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT + method: test {p0=search/160_exists_query/Test exists query on date field in empty index} + issue: https://github.com/elastic/elasticsearch/issues/133439 +- class: org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT + method: test {yaml=search.vectors/90_sparse_vector/Indexing and searching multi-value sparse vectors in >=8.15} + issue: https://github.com/elastic/elasticsearch/issues/133442 +- class: org.elasticsearch.xpack.test.rest.XPackRestIT + method: test {p0=esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version} + issue: https://github.com/elastic/elasticsearch/issues/133449 +- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithFiltersIT + method: testFilterWithUnavailableRemote + issue: https://github.com/elastic/elasticsearch/issues/133450 +- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlClientYamlIT + method: test {p0=esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version} + issue: https://github.com/elastic/elasticsearch/issues/133461 +- class: org.elasticsearch.xpack.esql.action.TimeSeriesRateIT + method: testRateWithTimeBucketAndClusterMultipleMetricsByMin + issue: https://github.com/elastic/elasticsearch/issues/133478 +- class: org.elasticsearch.xpack.esql.action.LookupJoinTypesIT + method: testLookupJoinOthers + issue: https://github.com/elastic/elasticsearch/issues/133480 +- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT + method: testStopQueryLocal + issue: https://github.com/elastic/elasticsearch/issues/133481 +- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT + method: testEsqlSource + issue: https://github.com/elastic/elasticsearch/issues/132601 +- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT + method: testEsqlSource + issue: https://github.com/elastic/elasticsearch/issues/132600 +- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT + method: testEsqlSource + issue: https://github.com/elastic/elasticsearch/issues/132602 +- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT + method: testMatchAllQuery + issue: https://github.com/elastic/elasticsearch/issues/133497 +- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT + method: testMatchAllQuery + issue: https://github.com/elastic/elasticsearch/issues/133498 +- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT + method: testMatchAllQuery + issue: https://github.com/elastic/elasticsearch/issues/133499 +- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT + method: testRandomQueries + issue: https://github.com/elastic/elasticsearch/issues/133503 +- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT + method: testRandomQueries + issue: https://github.com/elastic/elasticsearch/issues/133504 +- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT + method: testRandomQueries + issue: https://github.com/elastic/elasticsearch/issues/133505 +- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT + method: test {csv-spec:spatial.ConvertFromStringParseError} + issue: https://github.com/elastic/elasticsearch/issues/133507 +- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT + method: test {p0=search.vectors/90_sparse_vector/Indexing and searching multi-value sparse vectors in >=8.15} + issue: https://github.com/elastic/elasticsearch/issues/133508 +- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT + method: testTermsQuery + issue: https://github.com/elastic/elasticsearch/issues/133516 +- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT + method: testTermsQuery + issue: https://github.com/elastic/elasticsearch/issues/133517 +- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT + method: testTermsQuery + issue: https://github.com/elastic/elasticsearch/issues/133518 +- class: org.elasticsearch.xpack.logsdb.qa.LogsDbVersusReindexedLogsDbChallengeRestIT + method: testEsqlSource + issue: https://github.com/elastic/elasticsearch/issues/133520 +- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT + method: testTopNPushedToLucene + issue: https://github.com/elastic/elasticsearch/issues/133556 +- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT + method: testFilterNestedFields + issue: https://github.com/elastic/elasticsearch/issues/133557 +- class: org.elasticsearch.xpack.logsdb.qa.LogsDbVersusReindexedLogsDbChallengeRestIT + method: testMatchAllQuery + issue: https://github.com/elastic/elasticsearch/issues/133560 +- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT + method: test {p0=search/10_source_filtering/no filtering} + issue: https://github.com/elastic/elasticsearch/issues/133561 +- class: org.elasticsearch.compute.lucene.LuceneTopNSourceOperatorTests + method: testShardDataPartitioning + issue: https://github.com/elastic/elasticsearch/issues/133574 # Examples: # diff --git a/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java index 9a0f4baa8f21a..95ec2752b1a6d 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java @@ -103,6 +103,9 @@ public void testLongIndexingCoercesIntoRange() throws Exception { assertThat(doc.rootDoc().getFields("field"), hasSize(1)); } + // This is the biggest long that double can represent exactly + public static final long MAX_SAFE_LONG_FOR_DOUBLE = 1L << 53; + @Override protected Number randomNumber() { if (randomBoolean()) { @@ -111,8 +114,8 @@ protected Number randomNumber() { if (randomBoolean()) { return randomDouble(); } - assumeFalse("https://github.com/elastic/elasticsearch/issues/70585", true); - return randomDoubleBetween(Long.MIN_VALUE, Long.MAX_VALUE, true); + // TODO: increase the range back to full LONG range once https://github.com/elastic/elasticsearch/issues/132893 is fixed + return randomDoubleBetween(-MAX_SAFE_LONG_FOR_DOUBLE, MAX_SAFE_LONG_FOR_DOUBLE, true); } @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/70585") From 7d9dc01df1c6a6ff7434c41830e391297add3865 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 26 Aug 2025 13:14:31 -0600 Subject: [PATCH 2/2] fix muted --- muted-tests.yml | 134 ++---------------------------------------------- 1 file changed, 4 insertions(+), 130 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 289f6feb4db60..4312f1f197cd7 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -439,136 +439,10 @@ tests: issue: https://github.com/elastic/elasticsearch/issues/133234 - class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest method: latest files cannot change base id - issue: https://github.com/elastic/elasticsearch/issues/133132 -- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest - method: definitions have primary ids which cannot change - issue: https://github.com/elastic/elasticsearch/issues/133131 -- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT - method: testGroupBySubset - issue: https://github.com/elastic/elasticsearch/issues/133220 -- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT - method: testGroupByNothing - issue: https://github.com/elastic/elasticsearch/issues/133225 -- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest - method: named and unreferenced definitions cannot have the same name - issue: https://github.com/elastic/elasticsearch/issues/133255 -- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest - method: unreferenced definitions can have primary ids that are patches - issue: https://github.com/elastic/elasticsearch/issues/133256 -- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest - method: latest can refer to an unreferenced definition - issue: https://github.com/elastic/elasticsearch/issues/133257 -- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT - method: test {p0=search.vectors/100_knn_nested_search/nested kNN search inner_hits & profiling} - issue: https://github.com/elastic/elasticsearch/issues/133273 -- class: org.elasticsearch.xpack.security.authc.AuthenticationServiceTests - method: testInvalidToken - issue: https://github.com/elastic/elasticsearch/issues/133328 -- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT - method: test {p0=search/160_exists_query/Test exists query on unmapped byte field} - issue: https://github.com/elastic/elasticsearch/issues/133331 -- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT - method: test {csv-spec:change_point.Values null column} - issue: https://github.com/elastic/elasticsearch/issues/133334 -- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT - method: test {p0=search/110_field_collapsing/field collapsing} - issue: https://github.com/elastic/elasticsearch/issues/133361 -- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT - method: test {csv-spec:spatial.ConvertFromStringParseError} - issue: https://github.com/elastic/elasticsearch/issues/133364 -- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT - method: testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips - issue: https://github.com/elastic/elasticsearch/issues/127302 -- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT - method: testCCSClusterDetailsWhereAllShardsSkippedInCanMatch - issue: https://github.com/elastic/elasticsearch/issues/133370 -- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT - method: test {p0=search.vectors/42_knn_search_int4_flat/kNN search with filter} - issue: https://github.com/elastic/elasticsearch/issues/133420 -- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT - method: test {p0=search/160_exists_query/Test exists query on date field in empty index} - issue: https://github.com/elastic/elasticsearch/issues/133439 -- class: org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT - method: test {yaml=search.vectors/90_sparse_vector/Indexing and searching multi-value sparse vectors in >=8.15} - issue: https://github.com/elastic/elasticsearch/issues/133442 -- class: org.elasticsearch.xpack.test.rest.XPackRestIT - method: test {p0=esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version} - issue: https://github.com/elastic/elasticsearch/issues/133449 -- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithFiltersIT - method: testFilterWithUnavailableRemote - issue: https://github.com/elastic/elasticsearch/issues/133450 -- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlClientYamlIT - method: test {p0=esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version} - issue: https://github.com/elastic/elasticsearch/issues/133461 -- class: org.elasticsearch.xpack.esql.action.TimeSeriesRateIT - method: testRateWithTimeBucketAndClusterMultipleMetricsByMin - issue: https://github.com/elastic/elasticsearch/issues/133478 -- class: org.elasticsearch.xpack.esql.action.LookupJoinTypesIT - method: testLookupJoinOthers - issue: https://github.com/elastic/elasticsearch/issues/133480 -- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT - method: testStopQueryLocal - issue: https://github.com/elastic/elasticsearch/issues/133481 -- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT - method: testEsqlSource - issue: https://github.com/elastic/elasticsearch/issues/132601 -- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT - method: testEsqlSource - issue: https://github.com/elastic/elasticsearch/issues/132600 -- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT - method: testEsqlSource - issue: https://github.com/elastic/elasticsearch/issues/132602 -- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT - method: testMatchAllQuery - issue: https://github.com/elastic/elasticsearch/issues/133497 -- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT - method: testMatchAllQuery - issue: https://github.com/elastic/elasticsearch/issues/133498 -- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT - method: testMatchAllQuery - issue: https://github.com/elastic/elasticsearch/issues/133499 -- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT - method: testRandomQueries - issue: https://github.com/elastic/elasticsearch/issues/133503 -- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT - method: testRandomQueries - issue: https://github.com/elastic/elasticsearch/issues/133504 -- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT - method: testRandomQueries - issue: https://github.com/elastic/elasticsearch/issues/133505 -- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT - method: test {csv-spec:spatial.ConvertFromStringParseError} - issue: https://github.com/elastic/elasticsearch/issues/133507 -- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT - method: test {p0=search.vectors/90_sparse_vector/Indexing and searching multi-value sparse vectors in >=8.15} - issue: https://github.com/elastic/elasticsearch/issues/133508 -- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT - method: testTermsQuery - issue: https://github.com/elastic/elasticsearch/issues/133516 -- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT - method: testTermsQuery - issue: https://github.com/elastic/elasticsearch/issues/133517 -- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT - method: testTermsQuery - issue: https://github.com/elastic/elasticsearch/issues/133518 -- class: org.elasticsearch.xpack.logsdb.qa.LogsDbVersusReindexedLogsDbChallengeRestIT - method: testEsqlSource - issue: https://github.com/elastic/elasticsearch/issues/133520 -- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT - method: testTopNPushedToLucene - issue: https://github.com/elastic/elasticsearch/issues/133556 -- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT - method: testFilterNestedFields - issue: https://github.com/elastic/elasticsearch/issues/133557 -- class: org.elasticsearch.xpack.logsdb.qa.LogsDbVersusReindexedLogsDbChallengeRestIT - method: testMatchAllQuery - issue: https://github.com/elastic/elasticsearch/issues/133560 -- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT - method: test {p0=search/10_source_filtering/no filtering} - issue: https://github.com/elastic/elasticsearch/issues/133561 -- class: org.elasticsearch.compute.lucene.LuceneTopNSourceOperatorTests - method: testShardDataPartitioning - issue: https://github.com/elastic/elasticsearch/issues/133574 + issue: https://github.com/elastic/elasticsearch/issues/133231 +- class: org.elasticsearch.packaging.test.DockerTests + method: test072RunEsAsDifferentUserAndGroup + issue: https://github.com/elastic/elasticsearch/issues/131412 # Examples: #