Skip to content

Commit 8383d04

Browse files
Merge branch 'main' into svilen/132711
2 parents a9440a7 + 0437da5 commit 8383d04

File tree

14 files changed

+144
-149
lines changed

14 files changed

+144
-149
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ steps:
6565
timeout_in_minutes: 300
6666
matrix:
6767
setup:
68-
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.3", "9.0.6", "9.1.2", "9.2.0"]
68+
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.3", "9.0.6", "9.1.3", "9.2.0"]
6969
agents:
7070
provider: gcp
7171
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ steps:
366366
env:
367367
BWC_VERSION: 9.0.6
368368

369-
- label: "{{matrix.image}} / 9.1.2 / packaging-tests-upgrade"
370-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.2
369+
- label: "{{matrix.image}} / 9.1.3 / packaging-tests-upgrade"
370+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.3
371371
timeout_in_minutes: 300
372372
matrix:
373373
setup:
@@ -380,7 +380,7 @@ steps:
380380
machineType: custom-16-32768
381381
buildDirectory: /dev/shm/bk
382382
env:
383-
BWC_VERSION: 9.1.2
383+
BWC_VERSION: 9.1.3
384384

385385
- label: "{{matrix.image}} / 9.2.0 / packaging-tests-upgrade"
386386
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.0

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ steps:
401401
- signal_reason: agent_stop
402402
limit: 3
403403

404-
- label: 9.1.2 / bwc
405-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.2#bwcTest
404+
- label: 9.1.3 / bwc
405+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.3#bwcTest
406406
timeout_in_minutes: 300
407407
agents:
408408
provider: gcp
@@ -411,7 +411,7 @@ steps:
411411
buildDirectory: /dev/shm/bk
412412
preemptible: true
413413
env:
414-
BWC_VERSION: 9.1.2
414+
BWC_VERSION: 9.1.3
415415
retry:
416416
automatic:
417417
- exit_status: "-1"
@@ -506,7 +506,7 @@ steps:
506506
setup:
507507
ES_RUNTIME_JAVA:
508508
- openjdk21
509-
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.3", "9.0.6", "9.1.2", "9.2.0"]
509+
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.3", "9.0.6", "9.1.3", "9.2.0"]
510510
agents:
511511
provider: gcp
512512
image: family/elasticsearch-ubuntu-2404
@@ -550,7 +550,7 @@ steps:
550550
ES_RUNTIME_JAVA:
551551
- openjdk21
552552
- openjdk23
553-
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.3", "9.0.6", "9.1.2", "9.2.0"]
553+
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.3", "9.0.6", "9.1.3", "9.2.0"]
554554
agents:
555555
provider: gcp
556556
image: family/elasticsearch-ubuntu-2404

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ BWC_VERSION:
2020
- "8.18.6"
2121
- "8.19.3"
2222
- "9.0.6"
23-
- "9.1.2"
23+
- "9.1.3"
2424
- "9.2.0"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ BWC_VERSION:
33
- "8.18.6"
44
- "8.19.3"
55
- "9.0.6"
6-
- "9.1.2"
6+
- "9.1.3"
77
- "9.2.0"

muted-tests.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,6 @@ tests:
354354
- class: org.elasticsearch.xpack.esql.inference.bulk.BulkInferenceExecutorTests
355355
method: testSuccessfulExecution
356356
issue: https://github.com/elastic/elasticsearch/issues/130306
357-
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
358-
method: test {p0=msearch/20_typed_keys/Multisearch test with typed_keys parameter for sampler and significant terms}
359-
issue: https://github.com/elastic/elasticsearch/issues/130472
360357
- class: org.elasticsearch.gradle.LoggedExecFuncTest
361358
method: failed tasks output logged to console when spooling true
362359
issue: https://github.com/elastic/elasticsearch/issues/119509
@@ -378,9 +375,6 @@ tests:
378375
- class: org.elasticsearch.xpack.esql.ccq.MultiClustersIT
379376
method: testLookupJoinAliases
380377
issue: https://github.com/elastic/elasticsearch/issues/131166
381-
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
382-
method: test {p0=field_caps/40_time_series/Get simple time series field caps}
383-
issue: https://github.com/elastic/elasticsearch/issues/131225
384378
- class: org.elasticsearch.packaging.test.DockerTests
385379
method: test090SecurityCliPackaging
386380
issue: https://github.com/elastic/elasticsearch/issues/131107
@@ -396,9 +390,6 @@ tests:
396390
- class: org.elasticsearch.packaging.test.DockerTests
397391
method: test171AdditionalCliOptionsAreForwarded
398392
issue: https://github.com/elastic/elasticsearch/issues/120925
399-
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
400-
method: test {p0=search/110_field_collapsing/field collapsing, inner_hits and maxConcurrentGroupRequests}
401-
issue: https://github.com/elastic/elasticsearch/issues/131348
402393
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
403394
method: test {p0=ml/delete_expired_data/Test delete expired data with body parameters}
404395
issue: https://github.com/elastic/elasticsearch/issues/131364
@@ -420,9 +411,6 @@ tests:
420411
- class: org.elasticsearch.xpack.esql.heap_attack.HeapAttackIT
421412
method: testLookupExplosionNoFetch
422413
issue: https://github.com/elastic/elasticsearch/issues/128720
423-
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
424-
method: test {p0=vector-tile/20_aggregations/stats agg}
425-
issue: https://github.com/elastic/elasticsearch/issues/131484
426414
- class: org.elasticsearch.packaging.test.DockerTests
427415
method: test050BasicApiTests
428416
issue: https://github.com/elastic/elasticsearch/issues/120911
@@ -441,9 +429,6 @@ tests:
441429
- class: org.elasticsearch.packaging.test.DockerTests
442430
method: test010Install
443431
issue: https://github.com/elastic/elasticsearch/issues/131376
444-
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
445-
method: test {p0=search/40_indices_boost/Indices boost with alias}
446-
issue: https://github.com/elastic/elasticsearch/issues/131598
447432
- class: org.elasticsearch.compute.lucene.read.SortedSetOrdinalsBuilderTests
448433
method: testReader
449434
issue: https://github.com/elastic/elasticsearch/issues/131573
@@ -519,6 +504,9 @@ tests:
519504
- class: org.elasticsearch.xpack.ml.integration.RevertModelSnapshotIT
520505
method: testRevertModelSnapshot
521506
issue: https://github.com/elastic/elasticsearch/issues/132733
507+
- class: org.elasticsearch.repositories.SnapshotMetricsIT
508+
method: testSnapshotAPMMetrics
509+
issue: https://github.com/elastic/elasticsearch/issues/132731
522510

523511
# Examples:
524512
#

qa/ccs-common-rest/src/yamlRestTest/java/org/elasticsearch/test/rest/yaml/RcsCcsCommonYamlTestSuiteIT.java

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import java.util.Map;
4848
import java.util.Optional;
4949
import java.util.Set;
50+
import java.util.concurrent.atomic.AtomicBoolean;
5051
import java.util.concurrent.atomic.AtomicReference;
5152
import java.util.stream.Collectors;
5253
import java.util.stream.Stream;
@@ -75,6 +76,11 @@ public class RcsCcsCommonYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
7576
// the remote cluster is the one we write index operations etc... to
7677
private static final String REMOTE_CLUSTER_NAME = "remote_cluster";
7778
private static final AtomicReference<Map<String, Object>> API_KEY_MAP_REF = new AtomicReference<>();
79+
private static final AtomicBoolean isRemoteConfigured = new AtomicBoolean(false);
80+
private static final AtomicBoolean isCombinedComputed = new AtomicBoolean(false);
81+
private static final AtomicReference<TestFeatureService> combinedTestFeatureServiceRef = new AtomicReference<>();
82+
private static final AtomicReference<Set<String>> combinedOsSetRef = new AtomicReference<>();
83+
private static final AtomicReference<Set<String>> combinedNodeVersionsRef = new AtomicReference<>();
7884

7985
private static LocalClusterConfigProvider commonClusterConfig = cluster -> cluster.module("x-pack-async-search")
8086
.module("aggregations")
@@ -217,7 +223,7 @@ public void initSearchClient() throws IOException {
217223
basicAuthHeaderValue("remote_search_user", new SecureString("x-pack-test-password".toCharArray()))
218224
)
219225
.build(),
220-
clusterHosts.toArray(new HttpHost[clusterHosts.size()])
226+
clusterHosts.toArray(new HttpHost[0])
221227
);
222228
adminSearchClient = buildClient(
223229
Settings.builder()
@@ -226,13 +232,18 @@ public void initSearchClient() throws IOException {
226232
basicAuthHeaderValue("test_admin", new SecureString("x-pack-test-password".toCharArray()))
227233
)
228234
.build(),
229-
clusterHosts.toArray(new HttpHost[clusterHosts.size()])
235+
clusterHosts.toArray(new HttpHost[0])
230236
);
231237

232238
searchYamlTestClient = new TestCandidateAwareClient(getRestSpec(), searchClient, hosts, this::getClientBuilderWithSniffedHosts);
239+
}
240+
241+
assert searchClient != null;
242+
assert adminSearchClient != null;
243+
assert clusterHosts != null;
233244

245+
if (isRemoteConfigured.compareAndSet(false, true)) {
234246
configureRemoteCluster();
235-
// check that we have an established CCS connection
236247
Request request = new Request("GET", "_remote/info");
237248
Response response = adminSearchClient.performRequest(request);
238249
assertOK(response);
@@ -241,11 +252,6 @@ public void initSearchClient() throws IOException {
241252
assertEquals("::es_redacted::", responseObject.evaluate(REMOTE_CLUSTER_NAME + ".cluster_credentials"));
242253
logger.info("Established connection to remote cluster [" + REMOTE_CLUSTER_NAME + "]");
243254
}
244-
245-
assert searchClient != null;
246-
assert adminSearchClient != null;
247-
assert clusterHosts != null;
248-
249255
searchYamlTestClient.setTestCandidate(getTestCandidate());
250256
}
251257

@@ -288,42 +294,47 @@ protected ClientYamlTestExecutionContext createRestTestExecutionContext(
288294
// Ensure the test specific initialization is run by calling it explicitly (@Before annotations on base-derived class may
289295
// be called in a different order)
290296
initSearchClient();
291-
// Reconcile and provide unified features, os, version(s), based on both clientYamlTestClient and searchYamlTestClient
292-
var searchOs = readOsFromNodesInfo(adminSearchClient);
293-
var searchNodeVersions = readVersionsFromNodesInfo(adminSearchClient);
294-
var semanticNodeVersions = searchNodeVersions.stream()
295-
.map(ESRestTestCase::parseLegacyVersion)
296-
.flatMap(Optional::stream)
297-
.collect(Collectors.toSet());
298-
final TestFeatureService searchTestFeatureService = createTestFeatureService(
299-
getClusterStateFeatures(adminSearchClient),
300-
semanticNodeVersions
301-
);
302-
final TestFeatureService combinedTestFeatureService = (featureId, any) -> {
303-
boolean adminFeature = testFeatureService.clusterHasFeature(featureId, any);
304-
boolean searchFeature = searchTestFeatureService.clusterHasFeature(featureId, any);
305-
return any ? adminFeature || searchFeature : adminFeature && searchFeature;
306-
};
307297

308-
final Set<String> combinedOsSet = Stream.concat(osSet.stream(), Stream.of(searchOs)).collect(Collectors.toSet());
309-
final Set<String> combinedNodeVersions = Stream.concat(nodesVersions.stream(), searchNodeVersions.stream())
310-
.collect(Collectors.toSet());
298+
// Compute & cache combined features/OS/versions
299+
if (isCombinedComputed.compareAndSet(false, true)) {
300+
var searchOs = readOsFromNodesInfo(adminSearchClient);
301+
var searchNodeVersions = readVersionsFromNodesInfo(adminSearchClient);
302+
303+
var semanticNodeVersions = searchNodeVersions.stream()
304+
.map(ESRestTestCase::parseLegacyVersion)
305+
.flatMap(Optional::stream)
306+
.collect(Collectors.toSet());
307+
308+
final TestFeatureService searchTestFeatureService = createTestFeatureService(
309+
getClusterStateFeatures(adminSearchClient),
310+
semanticNodeVersions
311+
);
312+
313+
final TestFeatureService combinedTestFeatureService = (featureId, any) -> {
314+
boolean adminFeature = testFeatureService.clusterHasFeature(featureId, any);
315+
boolean searchFeature = searchTestFeatureService.clusterHasFeature(featureId, any);
316+
return any ? (adminFeature || searchFeature) : (adminFeature && searchFeature);
317+
};
318+
final Set<String> combinedOsSet = Stream.concat(osSet.stream(), Stream.of(searchOs)).collect(Collectors.toSet());
319+
final Set<String> combinedNodeVersions = Stream.concat(nodesVersions.stream(), searchNodeVersions.stream())
320+
.collect(Collectors.toSet());
321+
322+
combinedTestFeatureServiceRef.set(combinedTestFeatureService);
323+
combinedOsSetRef.set(combinedOsSet);
324+
combinedNodeVersionsRef.set(combinedNodeVersions);
325+
}
311326

312327
return new ClientYamlTestExecutionContext(
313328
clientYamlTestCandidate,
314329
clientYamlTestClient,
315330
randomizeContentType(),
316-
combinedNodeVersions,
317-
combinedTestFeatureService,
318-
combinedOsSet
331+
combinedNodeVersionsRef.get(),
332+
combinedTestFeatureServiceRef.get(),
333+
combinedOsSetRef.get()
319334
) {
320335
// depending on the API called, we either return the client running against the "write" or the "search" cluster here
321336
protected ClientYamlTestClient clientYamlTestClient(String apiName) {
322-
if (CCS_APIS.contains(apiName)) {
323-
return searchYamlTestClient;
324-
} else {
325-
return super.clientYamlTestClient(apiName);
326-
}
337+
return CCS_APIS.contains(apiName) ? searchYamlTestClient : super.clientYamlTestClient(apiName);
327338
}
328339
};
329340
} catch (IOException e) {

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ static TransportVersion def(int id) {
339339
public static final TransportVersion ESQL_SAMPLE_OPERATOR_STATUS_9_1 = def(9_112_0_03);
340340
public static final TransportVersion INITIAL_ELASTICSEARCH_9_1_1 = def(9_112_0_04);
341341
public static final TransportVersion INITIAL_ELASTICSEARCH_9_1_2 = def(9_112_0_05);
342+
public static final TransportVersion INITIAL_ELASTICSEARCH_9_1_3 = def(9_112_0_06);
342343
public static final TransportVersion PROJECT_STATE_REGISTRY_RECORDS_DELETIONS = def(9_113_0_00);
343344
public static final TransportVersion ESQL_SERIALIZE_TIMESERIES_FIELD_TYPE = def(9_114_0_00);
344345
public static final TransportVersion ML_INFERENCE_IBM_WATSONX_COMPLETION_ADDED = def(9_115_0_00);
@@ -430,7 +431,7 @@ static TransportVersion def(int id) {
430431
* Reference to the minimum transport version that can be used with CCS.
431432
* This should be the transport version used by the previous minor release.
432433
*/
433-
public static final TransportVersion MINIMUM_CCS_VERSION = INITIAL_ELASTICSEARCH_9_0_5;
434+
public static final TransportVersion MINIMUM_CCS_VERSION = INITIAL_ELASTICSEARCH_9_1_2;
434435

435436
/**
436437
* Sorted list of all versions defined in this class

server/src/main/java/org/elasticsearch/Version.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ public class Version implements VersionId<Version>, ToXContentFragment {
228228
public static final Version V_9_1_0 = new Version(9_01_00_99);
229229
public static final Version V_9_1_1 = new Version(9_01_01_99);
230230
public static final Version V_9_1_2 = new Version(9_01_02_99);
231+
public static final Version V_9_1_3 = new Version(9_01_03_99);
231232
public static final Version V_9_2_0 = new Version(9_02_00_99);
232233
public static final Version CURRENT = V_9_2_0;
233234

server/src/main/java/org/elasticsearch/index/codec/vectors/DefaultIVFVectorsReader.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ private static class MemorySegmentPostingsVisitor implements PostingVisitor {
326326
final float[] centroid;
327327
long slicePos;
328328
OptimizedScalarQuantizer.QuantizationResult queryCorrections;
329-
DocIdsWriter docIdsWriter = new DocIdsWriter();
330329

331330
final float[] scratch;
332331
final int[] quantizationScratch;
333332
final byte[] quantizedQueryScratch;
334333
final OptimizedScalarQuantizer quantizer;
334+
final DocIdsWriter idsWriter = new DocIdsWriter();
335335
final float[] correctiveValues = new float[3];
336336
final long quantizedVectorByteSize;
337337

@@ -369,7 +369,13 @@ public int resetPostingsScorer(long offset) throws IOException {
369369
vectors = indexInput.readVInt();
370370
// read the doc ids
371371
assert vectors <= docIdsScratch.length;
372-
docIdsWriter.readInts(indexInput, vectors, docIdsScratch);
372+
idsWriter.readInts(indexInput, vectors, docIdsScratch);
373+
// reconstitute from the deltas
374+
int sum = 0;
375+
for (int i = 0; i < vectors; i++) {
376+
sum += docIdsScratch[i];
377+
docIdsScratch[i] = sum;
378+
}
373379
slicePos = indexInput.getFilePointer();
374380
return vectors;
375381
}

0 commit comments

Comments
 (0)