diff --git a/muted-tests.yml b/muted-tests.yml index fbda6774f4474..4befc6f3ec224 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -588,12 +588,6 @@ tests: - class: org.elasticsearch.search.sort.FieldSortIT method: testSortMixedFieldTypes issue: https://github.com/elastic/elasticsearch/issues/129445 -- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135338 -- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135344 - class: org.elasticsearch.xpack.esql.expression.function.scalar.score.DecayTests method: "testEvaluateInManyThreads {TestCase=, , , <_source> #17}" issue: https://github.com/elastic/elasticsearch/issues/135357 @@ -606,45 +600,12 @@ tests: - class: org.elasticsearch.xpack.esql.session.SessionUtilsTests method: testFromPages issue: https://github.com/elastic/elasticsearch/issues/135377 -- class: org.elasticsearch.upgrades.LogsUsageRollingUpgradeIT - method: testUsage {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135312 -- class: org.elasticsearch.upgrades.NoLogsUsageRollingUpgradeIT - method: testUsage {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135316 -- class: org.elasticsearch.upgrades.NoLogsUsageRollingUpgradeIT - method: testUsage {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135319 - class: org.elasticsearch.xpack.esql.expression.function.scalar.score.DecayTests method: "testEvaluateBlockWithoutNulls {TestCase=, , , <_source> #12}" issue: https://github.com/elastic/elasticsearch/issues/135394 -- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135327 -- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135320 -- class: org.elasticsearch.upgrades.StandardToLogsDbIndexModeRollingUpgradeIT - method: testLogsIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135315 -- class: org.elasticsearch.upgrades.StandardToLogsDbIndexModeRollingUpgradeIT - method: testLogsIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135314 - class: org.elasticsearch.xpack.esql.session.SessionUtilsTests method: testCheckPagesBelowSize issue: https://github.com/elastic/elasticsearch/issues/135398 -- class: org.elasticsearch.upgrades.TextRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135237 -- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135324 -- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135325 -- class: org.elasticsearch.upgrades.TextRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135238 - class: org.elasticsearch.upgrades.DataStreamsUpgradeIT method: testDataStreamValidationDoesNotBreakUpgrade issue: https://github.com/elastic/elasticsearch/issues/135406 @@ -654,9 +615,6 @@ tests: - class: org.elasticsearch.upgrades.QueryableBuiltInRolesUpgradeIT method: testBuiltInRolesSyncedOnClusterUpgrade issue: https://github.com/elastic/elasticsearch/issues/135194 -- class: org.elasticsearch.upgrades.StandardToLogsDbIndexModeRollingUpgradeIT - method: testLogsIndexing {upgradedNodes=1} - issue: https://github.com/elastic/elasticsearch/issues/135313 - class: org.elasticsearch.gradle.TestClustersPluginFuncTest method: override jdk usage via ES_JAVA_HOME for known jdk os incompatibilities issue: https://github.com/elastic/elasticsearch/issues/135413 diff --git a/server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java b/server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java index cc9f1c0e07db1..4fe064b1af067 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java @@ -51,6 +51,7 @@ public class MapperFeatures implements FeatureSpecification { static final NodeFeature PATTERN_TEXT = new NodeFeature("mapper.patterned_text"); static final NodeFeature IGNORED_SOURCE_FIELDS_PER_ENTRY = new NodeFeature("mapper.ignored_source_fields_per_entry"); public static final NodeFeature MULTI_FIELD_UNICODE_OPTIMISATION_FIX = new NodeFeature("mapper.multi_field.unicode_optimisation_fix"); + static final NodeFeature PATTERN_TEXT_RENAME = new NodeFeature("mapper.pattern_text_rename"); @Override public Set getTestFeatures() { @@ -87,7 +88,8 @@ public Set getTestFeatures() { PATTERN_TEXT, IGNORED_SOURCE_FIELDS_PER_ENTRY, MULTI_FIELD_UNICODE_OPTIMISATION_FIX, - MATCH_ONLY_TEXT_BLOCK_LOADER_FIX + MATCH_ONLY_TEXT_BLOCK_LOADER_FIX, + PATTERN_TEXT_RENAME ); } } diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java index 6fea6917bebc0..ebeaf84aba7be 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java @@ -11,7 +11,9 @@ import com.carrotsearch.randomizedtesting.annotations.Name; +import org.elasticsearch.Build; import org.elasticsearch.client.Request; +import org.junit.Before; import java.io.IOException; import java.time.Instant; @@ -29,6 +31,13 @@ public LogsUsageRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } + @Before + public void checkFeatures() { + if (Build.current().isSnapshot()) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + public void testUsage() throws Exception { assumeFalse("logsdb.prior_logs_usage only gets set in 8.x", oldClusterHasFeature("gte_v9.0.0")); String dataStreamName = "logs-mysql-error"; diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java index 48a709a66fa9e..5cf20d7254b85 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java @@ -11,6 +11,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name; +import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; @@ -20,6 +21,7 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.test.rest.ObjectPath; import org.elasticsearch.xcontent.XContentType; +import org.junit.Before; import java.io.IOException; import java.io.InputStream; @@ -74,6 +76,13 @@ public LogsdbIndexingRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) super(upgradedNodes); } + @Before + public void checkFeatures() { + if (Build.current().isSnapshot()) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + public void testIndexing() throws Exception { String dataStreamName = "logs-bwc-test"; if (isOldCluster()) { diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java index ab1f7e2e4480f..88209e9b04fef 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java @@ -11,6 +11,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name; +import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; @@ -21,6 +22,7 @@ import org.elasticsearch.index.mapper.MapperFeatures; import org.elasticsearch.test.rest.ObjectPath; import org.elasticsearch.xcontent.XContentType; +import org.junit.Before; import java.io.IOException; import java.io.InputStream; @@ -90,6 +92,13 @@ public MatchOnlyTextRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } + @Before + public void checkFeatures() { + if (Build.current().isSnapshot()) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + public void testIndexing() throws Exception { assumeTrue( "Match only text block loader fix is not present in this cluster", diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java index efb93e4782c11..053b0f0ce4b7a 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java @@ -11,6 +11,9 @@ import com.carrotsearch.randomizedtesting.annotations.Name; +import org.elasticsearch.Build; +import org.junit.Before; + import java.time.Instant; import java.util.Map; @@ -26,6 +29,13 @@ public NoLogsUsageRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } + @Before + public void checkFeatures() { + if (Build.current().isSnapshot()) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + public void testUsage() throws Exception { String dataStreamName = "logs-mysql-error"; if (isOldCluster()) { diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java index e8cf3027ac067..dbaac0124fc3c 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java @@ -11,6 +11,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name; +import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.RestClient; @@ -24,6 +25,7 @@ import org.elasticsearch.test.cluster.local.distribution.DistributionType; import org.hamcrest.Matcher; import org.hamcrest.Matchers; +import org.junit.Before; import org.junit.ClassRule; import java.io.IOException; @@ -114,6 +116,13 @@ protected Settings restClientSettings() { } }"""; + @Before + public void checkFeatures() { + if (Build.current().isSnapshot()) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + public void testLogsIndexing() throws IOException { if (isOldCluster()) { // given - create a template and data stream diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java index 2d00366605350..f48e5305a74b3 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java @@ -11,9 +11,11 @@ import com.carrotsearch.randomizedtesting.annotations.Name; +import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.test.rest.ObjectPath; import org.hamcrest.Matchers; +import org.junit.Before; import java.time.Instant; import java.util.Arrays; @@ -70,6 +72,13 @@ public SyntheticSourceRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) super(upgradedNodes); } + @Before + public void checkFeatures() { + if (Build.current().isSnapshot()) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + public void testIndexing() throws Exception { assumeTrue("requires storing leaf array offsets", oldClusterHasFeature("gte_v9.1.0")); String dataStreamName = "logs-bwc-test"; diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java index 0f0995d4550ce..942140935963c 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java @@ -9,6 +9,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name; +import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; @@ -18,6 +19,7 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.test.rest.ObjectPath; import org.elasticsearch.xcontent.XContentType; +import org.junit.Before; import java.io.IOException; import java.io.InputStream; @@ -87,6 +89,13 @@ public TextRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } + @Before + public void checkFeatures() { + if (Build.current().isSnapshot()) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + public void testIndexing() throws Exception { if (isOldCluster()) {