Skip to content

Commit 2ac4e98

Browse files
authored
Merge branch 'main' into fixup-search-error-trace-it
2 parents 925d730 + a78737d commit 2ac4e98

File tree

19 files changed

+587
-281
lines changed

19 files changed

+587
-281
lines changed

build-tools/src/main/java/org/elasticsearch/gradle/test/TestBuildInfoPlugin.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,9 @@ public void apply(Project project) {
5757
task.into("META-INF", copy -> copy.from(testBuildInfoTask));
5858
});
5959

60-
if (project.getRootProject().getName().equals("elasticsearch")) {
61-
project.getTasks()
62-
.withType(Test.class)
63-
.matching(test -> List.of("test", "internalClusterTest").contains(test.getName()))
64-
.configureEach(test -> {
65-
test.systemProperty("es.entitlement.enableForTests", "true");
66-
});
67-
}
60+
project.getTasks()
61+
.withType(Test.class)
62+
.matching(test -> List.of("test", "internalClusterTest").contains(test.getName()))
63+
.configureEach(test -> test.getSystemProperties().putIfAbsent("es.entitlement.enableForTests", "true"));
6864
}
6965
}

muted-tests.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -476,21 +476,9 @@ tests:
476476
- class: org.elasticsearch.compute.lucene.read.SortedSetOrdinalsBuilderTests
477477
method: testReader
478478
issue: https://github.com/elastic/elasticsearch/issues/131573
479-
- class: org.elasticsearch.search.SearchWithIndexBlocksIT
480-
method: testSearchShardsOnIndicesWithIndexRefreshBlocks
481-
issue: https://github.com/elastic/elasticsearch/issues/131662
482-
- class: org.elasticsearch.search.SearchWithIndexBlocksIT
483-
method: testSearchIndicesWithIndexRefreshBlocks
484-
issue: https://github.com/elastic/elasticsearch/issues/131693
485-
- class: org.elasticsearch.search.SearchWithIndexBlocksIT
486-
method: testOpenPITOnIndicesWithIndexRefreshBlocks
487-
issue: https://github.com/elastic/elasticsearch/issues/131695
488479
- class: org.elasticsearch.xpack.esql.ccq.MultiClustersIT
489480
method: testLookupJoinAliasesSkipOld
490481
issue: https://github.com/elastic/elasticsearch/issues/131697
491-
- class: org.elasticsearch.search.SearchWithIndexBlocksIT
492-
method: testMultiSearchIndicesWithIndexRefreshBlocks
493-
issue: https://github.com/elastic/elasticsearch/issues/131698
494482
- class: org.elasticsearch.indices.cluster.RemoteSearchForceConnectTimeoutIT
495483
method: testTimeoutSetting
496484
issue: https://github.com/elastic/elasticsearch/issues/131656
@@ -512,9 +500,6 @@ tests:
512500
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
513501
method: test {p0=search/600_flattened_ignore_above/flattened ignore_above multi-value field}
514502
issue: https://github.com/elastic/elasticsearch/issues/131967
515-
- class: org.elasticsearch.search.routing.SearchReplicaSelectionIT
516-
method: testNodeSelection
517-
issue: https://github.com/elastic/elasticsearch/issues/132017
518503
- class: org.elasticsearch.xpack.remotecluster.CrossClusterEsqlRCS1EnrichUnavailableRemotesIT
519504
method: testEsqlEnrichWithSkipUnavailable
520505
issue: https://github.com/elastic/elasticsearch/issues/132078
@@ -623,6 +608,13 @@ tests:
623608
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
624609
method: "testDenseVectorMappingUpdate {initialType=bbq_flat updateType=bbq_disk #2}"
625610
issue: https://github.com/elastic/elasticsearch/issues/132184
611+
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
612+
method: testDenseVectorMappingUpdate {initialType=bbq_hnsw updateType=bbq_disk}
613+
issue: https://github.com/elastic/elasticsearch/issues/132188
614+
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
615+
method: "testDenseVectorMappingUpdate {initialType=int8_flat updateType=bbq_disk #2}"
616+
issue: https://github.com/elastic/elasticsearch/issues/132189
617+
626618

627619
# Examples:
628620
#

plugins/examples/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ subprojects {
2020
targetCompatibility = 21
2121
}
2222

23+
test {
24+
// testing with entitlements doesn't work for example plugins ES-12453
25+
systemProperty 'es.entitlement.enableForTests', 'false'
26+
}
27+
2328
repositories {
2429
// Only necessary when building plugins against SNAPSHOT versions of Elasticsearch
2530
if (gradle.includedBuilds.isEmpty()) {

qa/multi-data-path/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apply plugin: 'elasticsearch.internal-yaml-rest-test'
2+
3+
// This subproject verifies MDP continues to work with entitlements.
4+
5+
restResources {
6+
restApi {
7+
include '_common', 'capabilities', 'index', 'indices', 'indices.create'
8+
}
9+
}
10+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.test.rest.yaml;
11+
12+
import com.carrotsearch.randomizedtesting.annotations.Name;
13+
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
14+
15+
import org.elasticsearch.test.cluster.ElasticsearchCluster;
16+
import org.junit.ClassRule;
17+
18+
import java.io.IOException;
19+
import java.nio.file.Files;
20+
21+
public class MDPYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
22+
23+
@ClassRule
24+
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().setting("path.shared_data", tempSharedDataPath()).build();
25+
26+
public MDPYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
27+
super(testCandidate);
28+
}
29+
30+
@ParametersFactory
31+
public static Iterable<Object[]> parameters() throws Exception {
32+
return createParameters();
33+
}
34+
35+
@Override
36+
protected String getTestRestCluster() {
37+
return cluster.getHttpAddresses();
38+
}
39+
40+
private static String tempSharedDataPath() {
41+
try {
42+
return Files.createTempDirectory("shared_data").toString();
43+
} catch (IOException e) {
44+
throw new AssertionError(e);
45+
}
46+
}
47+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
"Index using shared data path":
3+
4+
- requires:
5+
test_runner_features: ["warnings"]
6+
7+
- do:
8+
warnings:
9+
- "[index.data_path] setting was deprecated in Elasticsearch and will be removed in a future release. See the deprecation documentation for the next major version."
10+
indices.create:
11+
index: test_index
12+
body:
13+
settings:
14+
data_path: "test_index_data_path"
15+
16+
- do:
17+
index:
18+
index: test_index
19+
id: "1"
20+
body: { foo: bar }
21+
22+
- match: { result: created }
23+
24+
- do:
25+
index:
26+
index: test_index
27+
id: "1"
28+
body: { foo: bar }
29+
op_type: index
30+
31+
- match: { result: updated }

qa/vector/src/main/java/org/elasticsearch/test/knn/KnnIndexTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private static String formatIndexPath(CmdLineArgs args) {
101101
static Codec createCodec(CmdLineArgs args) {
102102
final KnnVectorsFormat format;
103103
if (args.indexType() == IndexType.IVF) {
104-
format = new IVFVectorsFormat(args.ivfClusterSize());
104+
format = new IVFVectorsFormat(args.ivfClusterSize(), IVFVectorsFormat.DEFAULT_CENTROIDS_PER_PARENT_CLUSTER);
105105
} else {
106106
if (args.quantizeBits() == 1) {
107107
if (args.indexType() == IndexType.FLAT) {

server/src/internalClusterTest/java/org/elasticsearch/search/SearchWithIndexBlocksIT.java

Lines changed: 0 additions & 180 deletions
This file was deleted.

server/src/main/java/org/elasticsearch/common/blobstore/BlobContainer.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ default void copyBlob(
308308
* <p>
309309
* This operation, together with {@link #compareAndSetRegister}, must have linearizable semantics: a collection of such operations must
310310
* act as if they operate serially, with each operation taking place at some instant in between its invocation and its completion.
311+
* <p>
312+
* If the listener completes exceptionally then the write operation should be considered as continuing to run and may therefore appear
313+
* to occur at some later point in time.
311314
*
312315
* @param purpose The purpose of the operation
313316
* @param key key of the value to update
@@ -330,6 +333,9 @@ void compareAndExchangeRegister(
330333
* <p>
331334
* This operation, together with {@link #compareAndExchangeRegister}, must have linearizable semantics: a collection of such operations
332335
* must act as if they operate serially, with each operation taking place at some instant in between its invocation and its completion.
336+
* <p>
337+
* If the listener completes exceptionally then the write operation should be considered as continuing to run and may therefore appear
338+
* to occur at some later point in time.
333339
*
334340
* @param purpose The purpose of the operation
335341
* @param key key of the value to update
@@ -361,7 +367,10 @@ default void compareAndSetRegister(
361367
* This operation has read-after-write consistency with respect to writes performed using {@link #compareAndExchangeRegister} and
362368
* {@link #compareAndSetRegister}, but does not guarantee full linearizability. In particular, a {@code getRegister} performed during
363369
* one of these write operations may return either the old or the new value, and a caller may therefore observe the old value
364-
* <i>after</i> observing the new value, as long as both such read operations take place before the write operation completes.
370+
* <i>after</i> observing the new value, as long as both such read operations take place before the success of the write operation.
371+
* <p>
372+
* Write operations which complete exceptionally may behave as if they continue to run, thus yielding old or new values for an extended
373+
* period of time. If multiple writes fail then {@code getRegister} may return any of the written values.
365374
*
366375
* @param purpose The purpose of the operation
367376
* @param key key of the value to get

0 commit comments

Comments
 (0)