Skip to content

Commit fcbfd42

Browse files
author
elasticsearchmachine
committed
Merge remote-tracking branch 'origin/main' into lucene_snapshot
2 parents ff667f0 + 8793248 commit fcbfd42

File tree

120 files changed

+3813
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+3813
-688
lines changed

distribution/docker/src/docker/iron_bank/hardening_manifest.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ resources:
5050

5151
# List of project maintainers
5252
maintainers:
53-
- name: "Rory Hunter"
54-
55-
username: "rory"
53+
- name: "Mark Vieira"
54+
55+
username: "mark-vieira"
56+
- name: "Rene Gröschke"
57+
58+
username: "breskeby"
5659
- email: "[email protected]"
5760
name: "Alexander Klepal"
5861
username: "alexander.klepal"

docs/changelog/117581.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 117581
2+
summary: Make reserved built-in roles queryable
3+
area: Authorization
4+
type: enhancement
5+
issues: []

docs/changelog/117643.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 117643
2+
summary: Drop null columns in text formats
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 116848

docs/changelog/117851.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 117851
2+
summary: Addition of `tier_preference`, `creation_date` and `version` fields in Elasticsearch monitoring template
3+
area: Monitoring
4+
type: enhancement
5+
issues: []

docs/changelog/118454.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 118454
2+
summary: Fix RLIKE folding with (unsupported) case insensitive pattern
3+
area: ES|QL
4+
type: bug
5+
issues: []

modules/percolator/src/main/java/org/elasticsearch/percolator/PercolateQueryBuilder.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
4444
import org.elasticsearch.common.io.stream.StreamInput;
4545
import org.elasticsearch.common.io.stream.StreamOutput;
46-
import org.elasticsearch.common.logging.DeprecationLogger;
4746
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
4847
import org.elasticsearch.common.xcontent.XContentHelper;
4948
import org.elasticsearch.index.IndexVersion;
@@ -80,28 +79,19 @@
8079
import java.util.Collections;
8180
import java.util.List;
8281
import java.util.Objects;
83-
import java.util.function.BiConsumer;
8482
import java.util.function.Supplier;
8583

8684
import static org.elasticsearch.search.SearchService.ALLOW_EXPENSIVE_QUERIES;
8785
import static org.elasticsearch.xcontent.ConstructingObjectParser.constructorArg;
8886
import static org.elasticsearch.xcontent.ConstructingObjectParser.optionalConstructorArg;
8987

9088
public class PercolateQueryBuilder extends AbstractQueryBuilder<PercolateQueryBuilder> {
91-
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(ParseField.class);
92-
static final String DOCUMENT_TYPE_DEPRECATION_MESSAGE = "[types removal] Types are deprecated in [percolate] queries. "
93-
+ "The [document_type] should no longer be specified.";
94-
static final String TYPE_DEPRECATION_MESSAGE = "[types removal] Types are deprecated in [percolate] queries. "
95-
+ "The [type] of the indexed document should no longer be specified.";
96-
9789
public static final String NAME = "percolate";
9890

9991
static final ParseField DOCUMENT_FIELD = new ParseField("document");
10092
static final ParseField DOCUMENTS_FIELD = new ParseField("documents");
10193
private static final ParseField NAME_FIELD = new ParseField("name");
10294
private static final ParseField QUERY_FIELD = new ParseField("field");
103-
private static final ParseField DOCUMENT_TYPE_FIELD = new ParseField("document_type");
104-
private static final ParseField INDEXED_DOCUMENT_FIELD_TYPE = new ParseField("type");
10595
private static final ParseField INDEXED_DOCUMENT_FIELD_INDEX = new ParseField("index");
10696
private static final ParseField INDEXED_DOCUMENT_FIELD_ID = new ParseField("id");
10797
private static final ParseField INDEXED_DOCUMENT_FIELD_ROUTING = new ParseField("routing");
@@ -368,10 +358,6 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
368358
);
369359
}
370360

371-
private static BiConsumer<PercolateQueryBuilder, String> deprecateAndIgnoreType(String key, String message) {
372-
return (target, type) -> deprecationLogger.compatibleCritical(key, message);
373-
}
374-
375361
private static BytesReference parseDocument(XContentParser parser) throws IOException {
376362
try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
377363
builder.copyCurrentStructure(parser);

muted-tests.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ tests:
4040
- class: org.elasticsearch.packaging.test.WindowsServiceTests
4141
method: test33JavaChanged
4242
issue: https://github.com/elastic/elasticsearch/issues/113177
43-
- class: org.elasticsearch.smoketest.MlWithSecurityIT
44-
method: test {yaml=ml/sparse_vector_search/Test sparse_vector search with query vector and pruning config}
45-
issue: https://github.com/elastic/elasticsearch/issues/108997
4643
- class: org.elasticsearch.packaging.test.WindowsServiceTests
4744
method: test80JavaOptsInEnvVar
4845
issue: https://github.com/elastic/elasticsearch/issues/113219
@@ -159,9 +156,6 @@ tests:
159156
issue: https://github.com/elastic/elasticsearch/issues/117473
160157
- class: org.elasticsearch.repositories.s3.RepositoryS3EcsClientYamlTestSuiteIT
161158
issue: https://github.com/elastic/elasticsearch/issues/117525
162-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
163-
method: test {p0=synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set}
164-
issue: https://github.com/elastic/elasticsearch/issues/116777
165159
- class: "org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT"
166160
method: "test {scoring.*}"
167161
issue: https://github.com/elastic/elasticsearch/issues/117641
@@ -302,6 +296,14 @@ tests:
302296
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests
303297
method: testInvalidJSON
304298
issue: https://github.com/elastic/elasticsearch/issues/116521
299+
- class: org.elasticsearch.xpack.ccr.rest.ShardChangesRestIT
300+
method: testShardChangesNoOperation
301+
issue: https://github.com/elastic/elasticsearch/issues/118800
302+
- class: org.elasticsearch.xpack.security.QueryableReservedRolesIT
303+
method: testDeletingAndCreatingSecurityIndexTriggersSynchronization
304+
issue: https://github.com/elastic/elasticsearch/issues/118806
305+
- class: org.elasticsearch.xpack.esql.session.IndexResolverFieldNamesTests
306+
issue: https://github.com/elastic/elasticsearch/issues/118814
305307

306308
# Examples:
307309
#

rest-api-spec/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
7171
task.skipTest("search/520_fetch_fields/fetch _seq_no via fields", "error code is changed from 5xx to 400 in 9.0")
7272
task.skipTest("search.vectors/41_knn_search_bbq_hnsw/Test knn search", "Scoring has changed in latest versions")
7373
task.skipTest("search.vectors/42_knn_search_bbq_flat/Test knn search", "Scoring has changed in latest versions")
74+
task.skipTest("synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set", "Can't work until auto-expand replicas is 0-1 for synonyms index")
7475
})

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
---
2-
"Reload analyzers for specific synonym set":
1+
setup:
32
- requires:
43
cluster_features: ["gte_v8.10.0"]
54
reason: Reloading analyzers for specific synonym set is introduced in 8.10.0
5+
66
# Create synonyms_set1
77
- do:
88
synonyms.put_synonym:
@@ -100,21 +100,25 @@
100100
- '{"index": {"_index": "my_index2", "_id": "2"}}'
101101
- '{"my_field": "goodbye"}'
102102

103-
# An update of synonyms_set1 must trigger auto-reloading of analyzers only for synonyms_set1
103+
---
104+
"Reload analyzers for specific synonym set":
105+
# These specific tests can't succeed in BwC, as synonyms auto-expand replicas are 0-all. Replicas can't be associated to
106+
# upgraded nodes, and thus we are not able to guarantee that the shards are not failed.
107+
# This test is skipped for BwC until synonyms index has auto-exapnd replicas set to 0-1.
108+
104109
- do:
105110
synonyms.put_synonym:
106111
id: synonyms_set1
107112
body:
108113
synonyms_set:
109114
- synonyms: "hello, salute"
110115
- synonyms: "ciao => goodbye"
116+
111117
- match: { result: "updated" }
112118
- gt: { reload_analyzers_details._shards.total: 0 }
113119
- gt: { reload_analyzers_details._shards.successful: 0 }
114120
- match: { reload_analyzers_details._shards.failed: 0 }
115-
- length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index
116-
- match: { reload_analyzers_details.reload_details.0.index: "my_index1" }
117-
- match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" }
121+
118122

119123
# Confirm that the index analyzers are reloaded for my_index1
120124
- do:
@@ -127,6 +131,23 @@
127131
query: salute
128132
- match: { hits.total.value: 1 }
129133

134+
---
135+
"Check analyzer reloaded and non failed shards for bwc tests":
136+
137+
- do:
138+
synonyms.put_synonym:
139+
id: synonyms_set1
140+
body:
141+
synonyms_set:
142+
- synonyms: "hello, salute"
143+
- synonyms: "ciao => goodbye"
144+
- match: { result: "updated" }
145+
- gt: { reload_analyzers_details._shards.total: 0 }
146+
- gt: { reload_analyzers_details._shards.successful: 0 }
147+
- length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index
148+
- match: { reload_analyzers_details.reload_details.0.index: "my_index1" }
149+
- match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" }
150+
130151
# Confirm that the index analyzers are still the same for my_index2
131152
- do:
132153
search:

server/src/main/java/org/elasticsearch/index/engine/NoOpEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public final class NoOpEngine extends ReadOnlyEngine {
4848
public NoOpEngine(EngineConfig config) {
4949
this(
5050
config,
51-
config.isPromotableToPrimary() ? null : new TranslogStats(0, 0, 0, 0, 0),
51+
config.isPromotableToPrimary() && config.getTranslogConfig().hasTranslog() ? null : new TranslogStats(0, 0, 0, 0, 0),
5252
config.isPromotableToPrimary()
5353
? null
5454
: new SeqNoStats(

0 commit comments

Comments
 (0)