Skip to content

Commit 130d406

Browse files
committed
Merge branch 'main' into pull/135540
2 parents b8cc72b + 89bb134 commit 130d406

File tree

29 files changed

+316
-239
lines changed

29 files changed

+316
-239
lines changed

docs/changelog/135036.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135036
2+
summary: Performance improvements for Lookup Join on Expression
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/135039.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135039
2+
summary: Use optimized field visitor for ignored source queries
3+
area: Mapping
4+
type: enhancement
5+
issues: []

docs/changelog/135393.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135393
2+
summary: Improve block loader for source only runtime IP fields
3+
area: Mapping
4+
type: enhancement
5+
issues: []

modules/reindex/src/main/java/org/elasticsearch/reindex/ReindexValidator.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,6 @@ static CharacterRunAutomaton buildRemoteWhitelist(List<String> whitelist) {
101101
}
102102
Automaton automaton = Regex.simpleMatchToAutomaton(whitelist.toArray(Strings.EMPTY_ARRAY));
103103
automaton = Operations.determinize(automaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT);
104-
if (Operations.isTotal(automaton)) {
105-
throw new IllegalArgumentException(
106-
"Refusing to start because whitelist "
107-
+ whitelist
108-
+ " accepts all addresses. "
109-
+ "This would allow users to reindex-from-remote any URL they like effectively having Elasticsearch make HTTP GETs "
110-
+ "for them."
111-
);
112-
}
113104
return new CharacterRunAutomaton(automaton);
114105
}
115106

modules/reindex/src/test/java/org/elasticsearch/reindex/ReindexFromRemoteWhitelistTests.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import java.net.UnknownHostException;
1818
import java.util.ArrayList;
19-
import java.util.Arrays;
2019
import java.util.List;
2120

2221
import static java.util.Collections.emptyList;
@@ -112,35 +111,12 @@ public void testUnwhitelistedRemote() {
112111
assertEquals("[not in list:" + port + "] not whitelisted in reindex.remote.whitelist", e.getMessage());
113112
}
114113

115-
public void testRejectMatchAll() {
116-
assertMatchesTooMuch(singletonList("*"));
117-
assertMatchesTooMuch(singletonList("**"));
118-
assertMatchesTooMuch(singletonList("***"));
119-
assertMatchesTooMuch(Arrays.asList("realstuff", "*"));
120-
assertMatchesTooMuch(Arrays.asList("*", "realstuff"));
121-
List<String> random = randomWhitelist();
122-
random.add("*");
123-
assertMatchesTooMuch(random);
124-
}
125-
126114
public void testIPv6Address() {
127115
List<String> whitelist = randomWhitelist();
128116
whitelist.add("[::1]:*");
129117
checkRemoteWhitelist(buildRemoteWhitelist(whitelist), newRemoteInfo("[::1]", 9200));
130118
}
131119

132-
private void assertMatchesTooMuch(List<String> whitelist) {
133-
Exception e = expectThrows(IllegalArgumentException.class, () -> buildRemoteWhitelist(whitelist));
134-
assertEquals(
135-
"Refusing to start because whitelist "
136-
+ whitelist
137-
+ " accepts all addresses. "
138-
+ "This would allow users to reindex-from-remote any URL they like effectively having Elasticsearch make HTTP GETs "
139-
+ "for them.",
140-
e.getMessage()
141-
);
142-
}
143-
144120
private List<String> randomWhitelist() {
145121
int size = between(1, 100);
146122
List<String> whitelist = new ArrayList<>(size);

muted-tests.yml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -615,57 +615,9 @@ tests:
615615
- class: org.elasticsearch.upgrades.SearchableSnapshotsRollingUpgradeIT
616616
method: testBlobStoreCacheWithFullCopyInMixedVersions
617617
issue: https://github.com/elastic/elasticsearch/issues/135474
618-
- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT
619-
method: testIndexing {upgradedNodes=3}
620-
issue: https://github.com/elastic/elasticsearch/issues/135338
621618
- class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT
622619
method: test
623620
issue: https://github.com/elastic/elasticsearch/issues/134407
624-
- class: org.elasticsearch.upgrades.LogsUsageRollingUpgradeIT
625-
method: testUsage {upgradedNodes=3}
626-
issue: https://github.com/elastic/elasticsearch/issues/135312
627-
- class: org.elasticsearch.upgrades.NoLogsUsageRollingUpgradeIT
628-
method: testUsage {upgradedNodes=3}
629-
issue: https://github.com/elastic/elasticsearch/issues/135316
630-
- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT
631-
method: testIndexing {upgradedNodes=3}
632-
issue: https://github.com/elastic/elasticsearch/issues/135320
633-
- class: org.elasticsearch.upgrades.TextRollingUpgradeIT
634-
method: testIndexing {upgradedNodes=3}
635-
issue: https://github.com/elastic/elasticsearch/issues/135237
636-
- class: org.elasticsearch.upgrades.StandardToLogsDbIndexModeRollingUpgradeIT
637-
method: testLogsIndexing {upgradedNodes=3}
638-
issue: https://github.com/elastic/elasticsearch/issues/135315
639-
- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT
640-
method: testIndexing {upgradedNodes=3}
641-
issue: https://github.com/elastic/elasticsearch/issues/135324
642-
- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT
643-
method: testIndexing {upgradedNodes=2}
644-
issue: https://github.com/elastic/elasticsearch/issues/135327
645-
- class: org.elasticsearch.upgrades.TextRollingUpgradeIT
646-
method: testIndexing {upgradedNodes=2}
647-
issue: https://github.com/elastic/elasticsearch/issues/135238
648-
- class: org.elasticsearch.upgrades.TextRollingUpgradeIT
649-
method: testIndexing {upgradedNodes=1}
650-
issue: https://github.com/elastic/elasticsearch/issues/135236
651-
- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT
652-
method: testIndexing {upgradedNodes=2}
653-
issue: https://github.com/elastic/elasticsearch/issues/135344
654-
- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT
655-
method: testIndexing {upgradedNodes=2}
656-
issue: https://github.com/elastic/elasticsearch/issues/135325
657-
- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT
658-
method: testIndexing {upgradedNodes=1}
659-
issue: https://github.com/elastic/elasticsearch/issues/135511
660-
- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT
661-
method: testIndexing {upgradedNodes=1}
662-
issue: https://github.com/elastic/elasticsearch/issues/135512
663-
- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT
664-
method: testIndexing {upgradedNodes=1}
665-
issue: https://github.com/elastic/elasticsearch/issues/135525
666-
- class: org.elasticsearch.index.codec.vectors.cluster.HierarchicalKMeansTests
667-
method: testFewDifferentValues
668-
issue: https://github.com/elastic/elasticsearch/issues/135538
669621

670622
# Examples:
671623
#

qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedFullClusterRestartTestCase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,16 @@ public void extractOldIndexVersion() throws Exception {
100100
}
101101
}
102102

103+
protected void beforeUpgrade() {
104+
if (getOldClusterVersion().endsWith("-SNAPSHOT")) {
105+
assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename"));
106+
}
107+
}
108+
103109
@Before
104110
public void maybeUpgrade() throws Exception {
105111
if (upgraded == false && requestedUpgradeStatus == UPGRADED) {
112+
beforeUpgrade();
106113
try {
107114
if (getOldClusterTestVersion().before(MINIMUM_WIRE_COMPATIBLE_VERSION)) {
108115
// First upgrade to latest wire compatible version

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedRollingUpgradeTestCase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public static Iterable<Object[]> parameters() {
5454

5555
protected abstract ElasticsearchCluster getUpgradeCluster();
5656

57+
protected void beforeUpgrade() {
58+
if (getOldClusterVersion().endsWith("-SNAPSHOT")) {
59+
assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename"));
60+
}
61+
}
62+
5763
@Before
5864
public void upgradeNode() throws Exception {
5965
// extract old cluster features
@@ -96,6 +102,8 @@ public void upgradeNode() throws Exception {
96102
// Skip remaining tests if upgrade failed
97103
assumeFalse("Cluster upgrade failed", upgradeFailed);
98104

105+
beforeUpgrade();
106+
99107
// finally, upgrade node
100108
if (upgradedNodes.size() < requestedUpgradedNodes) {
101109
closeClients();

server/src/main/java/org/elasticsearch/index/IndexVersions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,12 @@ private static Version parseUnchecked(String version) {
180180
public static final IndexVersion SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT = def(9_031_0_00, Version.LUCENE_10_2_2);
181181
public static final IndexVersion DEFAULT_DENSE_VECTOR_TO_BBQ_HNSW = def(9_032_0_00, Version.LUCENE_10_2_2);
182182
public static final IndexVersion MATCH_ONLY_TEXT_STORED_AS_BYTES = def(9_033_0_00, Version.LUCENE_10_2_2);
183-
public static final IndexVersion IGNORED_SOURCE_FIELDS_PER_ENTRY_WITH_FF = def(9_034_0_00, Version.LUCENE_10_2_2);
183+
public static final IndexVersion IGNORED_SOURCE_COALESCED_ENTRIES_WITH_FF = def(9_034_0_00, Version.LUCENE_10_2_2);
184184
public static final IndexVersion EXCLUDE_SOURCE_VECTORS_DEFAULT = def(9_035_0_00, Version.LUCENE_10_2_2);
185185
public static final IndexVersion DISABLE_NORMS_BY_DEFAULT_FOR_LOGSDB_AND_TSDB = def(9_036_0_00, Version.LUCENE_10_2_2);
186186
public static final IndexVersion TSID_CREATED_DURING_ROUTING = def(9_037_0_00, Version.LUCENE_10_2_2);
187187
public static final IndexVersion UPGRADE_TO_LUCENE_10_3_0 = def(9_038_0_00, Version.LUCENE_10_3_0);
188+
public static final IndexVersion IGNORED_SOURCE_COALESCED_ENTRIES = def(9_039_0_00, Version.LUCENE_10_3_0);
188189

189190
/*
190191
* STOP! READ THIS FIRST! No, really,

server/src/main/java/org/elasticsearch/index/codec/vectors/cluster/HierarchicalKMeans.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class HierarchicalKMeans {
2424
public static final int MAX_ITERATIONS_DEFAULT = 6;
2525
public static final int SAMPLES_PER_CLUSTER_DEFAULT = 64;
2626
public static final float DEFAULT_SOAR_LAMBDA = 1.0f;
27+
public static final int NO_SOAR_ASSIGNMENT = -1;
2728

2829
final int dimension;
2930
final int maxIterations;

0 commit comments

Comments
 (0)