Skip to content

Commit 44e8bb4

Browse files
committed
Merge remote-tracking branch 'es/main' into mergeSortedNumericField_5
2 parents 621ec0d + 939dc8b commit 44e8bb4

File tree

37 files changed

+1069
-994
lines changed

37 files changed

+1069
-994
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public enum DockerBase {
2626
"-wolfi",
2727
"apk"
2828
),
29-
30-
FIPS("docker.elastic.co/wolfi/chainguard-base-fips:sha256-feb7aeb1bbcb331afa089388f2fa1e81997fc24642ca4fa06b7e502ff599a4cf", "-fips", "apk"),
29+
FIPS("docker.elastic.co/wolfi/chainguard-base-fips:sha256-ebfc3f1d7dba992231747a2e05ad1b859843e81b5e676ad342859d7cf9e425a7", "-fips", "apk"),
3130
// spotless:on
3231
// Based on WOLFI above, with more extras. We don't set a base image because
3332
// we programmatically extend from the wolfi image.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+

modules/data-streams/src/main/java/org/elasticsearch/datastreams/DataStreamsPlugin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ public Collection<?> createComponents(PluginServices services) {
211211
errorStoreInitialisationService.get(),
212212
services.allocationService(),
213213
dataStreamLifecycleErrorsPublisher.get(),
214-
services.dataStreamGlobalRetentionSettings()
214+
services.dataStreamGlobalRetentionSettings(),
215+
services.projectResolver()
215216
)
216217
);
217218
dataLifecycleInitialisationService.get().init();

modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleService.java

Lines changed: 144 additions & 106 deletions
Large diffs are not rendered by default.

modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleFixtures.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import org.elasticsearch.cluster.metadata.DataStream;
1818
import org.elasticsearch.cluster.metadata.DataStreamLifecycle;
1919
import org.elasticsearch.cluster.metadata.IndexMetadata;
20-
import org.elasticsearch.cluster.metadata.Metadata;
2120
import org.elasticsearch.cluster.metadata.ProjectMetadata;
2221
import org.elasticsearch.cluster.metadata.ResettableValue;
2322
import org.elasticsearch.cluster.metadata.Template;
@@ -49,22 +48,6 @@
4948
*/
5049
public class DataStreamLifecycleFixtures {
5150

52-
public static DataStream createDataStream(
53-
Metadata.Builder builder,
54-
String dataStreamName,
55-
int backingIndicesCount,
56-
Settings.Builder backingIndicesSettings,
57-
@Nullable DataStreamLifecycle lifecycle,
58-
Long now
59-
) {
60-
var projectBuilder = builder.getProject(Metadata.DEFAULT_PROJECT_ID);
61-
if (projectBuilder == null) {
62-
projectBuilder = ProjectMetadata.builder(Metadata.DEFAULT_PROJECT_ID);
63-
builder.put(projectBuilder);
64-
}
65-
return createDataStream(projectBuilder, dataStreamName, backingIndicesCount, 0, backingIndicesSettings, lifecycle, now);
66-
}
67-
6851
public static DataStream createDataStream(
6952
ProjectMetadata.Builder builder,
7053
String dataStreamName,
@@ -76,31 +59,6 @@ public static DataStream createDataStream(
7659
return createDataStream(builder, dataStreamName, backingIndicesCount, 0, backingIndicesSettings, lifecycle, now);
7760
}
7861

79-
public static DataStream createDataStream(
80-
Metadata.Builder builder,
81-
String dataStreamName,
82-
int backingIndicesCount,
83-
int failureIndicesCount,
84-
Settings.Builder backingIndicesSettings,
85-
@Nullable DataStreamLifecycle lifecycle,
86-
Long now
87-
) {
88-
var projectBuilder = builder.getProject(Metadata.DEFAULT_PROJECT_ID);
89-
if (projectBuilder == null) {
90-
projectBuilder = ProjectMetadata.builder(Metadata.DEFAULT_PROJECT_ID);
91-
builder.put(projectBuilder);
92-
}
93-
return createDataStream(
94-
projectBuilder,
95-
dataStreamName,
96-
backingIndicesCount,
97-
failureIndicesCount,
98-
backingIndicesSettings,
99-
lifecycle,
100-
now
101-
);
102-
}
103-
10462
public static DataStream createDataStream(
10563
ProjectMetadata.Builder builder,
10664
String dataStreamName,

modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java

Lines changed: 209 additions & 252 deletions
Large diffs are not rendered by default.

modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloaderIT.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.elasticsearch.reindex.ReindexPlugin;
3636
import org.elasticsearch.rest.RestStatus;
3737
import org.elasticsearch.test.ESIntegTestCase;
38+
import org.elasticsearch.test.junit.annotations.TestLogging;
3839
import org.elasticsearch.transport.RemoteTransportException;
3940
import org.elasticsearch.xcontent.XContentType;
4041
import org.junit.ClassRule;
@@ -87,6 +88,10 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
8788
}
8889

8990
@SuppressWarnings("unchecked")
91+
@TestLogging(
92+
reason = "understanding why ipinfo asn database sometimes is not loaded",
93+
value = "org.elasticsearch.ingest.geoip.DatabaseNodeService:TRACE"
94+
)
9095
public void testEnterpriseDownloaderTask() throws Exception {
9196
/*
9297
* This test starts the enterprise geoip downloader task, and creates a database configuration. Then it creates an ingest
@@ -121,17 +126,17 @@ public void testEnterpriseDownloaderTask() throws Exception {
121126
assertNotNull(returnedSource);
122127
Object targetFieldValue = returnedSource.get(targetField);
123128
assertNotNull(targetFieldValue);
124-
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("Bredband2 AB"));
129+
assertThat(((Map<String, Object>) targetFieldValue).get("city_name"), equalTo("Linköping"));
125130
});
126131
assertBusy(() -> {
127132
logger.info("Ingesting another test document");
128-
String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "12.10.66.1");
133+
String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "103.134.48.0");
129134
GetResponse getResponse = client().get(new GetRequest(indexName, documentId)).actionGet();
130135
Map<String, Object> returnedSource = getResponse.getSource();
131136
assertNotNull(returnedSource);
132137
Object targetFieldValue = returnedSource.get(targetField);
133138
assertNotNull(targetFieldValue);
134-
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("OAKLAWN JOCKEY CLUB, INC."));
139+
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("PT Nevigate Telekomunikasi Indonesia"));
135140
});
136141
}
137142

modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public void testMetrics() throws Exception {
285285
final BlobStore blobStore = blobStoreRepository.blobStore();
286286
final BlobStore delegateBlobStore = ((BlobStoreWrapper) blobStore).delegate();
287287
final S3BlobStore s3BlobStore = (S3BlobStore) delegateBlobStore;
288-
final Map<S3BlobStore.StatsKey, S3BlobStore.IgnoreNoResponseMetricsCollector> statsCollectors = s3BlobStore
288+
final Map<S3BlobStore.StatsKey, S3BlobStore.ElasticsearchS3MetricsCollector> statsCollectors = s3BlobStore
289289
.getStatsCollectors().collectors;
290290

291291
final var plugins = internalCluster().getInstance(PluginsService.class, nodeName)

modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobStore.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,17 @@ public TimeValue getCompareAndExchangeAntiContentionDelay() {
143143
return service.compareAndExchangeAntiContentionDelay;
144144
}
145145

146-
// metrics collector that ignores null responses that we interpret as the request not reaching the S3 endpoint due to a network
147-
// issue
148-
class IgnoreNoResponseMetricsCollector extends RequestMetricCollector {
146+
/**
147+
* A {@link RequestMetricCollector} that processes the metrics related to each API invocation attempt according to Elasticsearch's needs
148+
*/
149+
class ElasticsearchS3MetricsCollector extends RequestMetricCollector {
149150

150151
final LongAdder requests = new LongAdder();
151152
final LongAdder operations = new LongAdder();
152153
private final Operation operation;
153154
private final Map<String, Object> attributes;
154155

155-
private IgnoreNoResponseMetricsCollector(Operation operation, OperationPurpose purpose) {
156+
private ElasticsearchS3MetricsCollector(Operation operation, OperationPurpose purpose) {
156157
this.operation = operation;
157158
this.attributes = RepositoriesMetrics.createAttributesMap(repositoryMetadata, purpose, operation.getKey());
158159
}
@@ -582,7 +583,7 @@ public String toString() {
582583
}
583584

584585
class StatsCollectors {
585-
final Map<StatsKey, IgnoreNoResponseMetricsCollector> collectors = new ConcurrentHashMap<>();
586+
final Map<StatsKey, ElasticsearchS3MetricsCollector> collectors = new ConcurrentHashMap<>();
586587

587588
RequestMetricCollector getMetricCollector(Operation operation, OperationPurpose purpose) {
588589
return collectors.computeIfAbsent(new StatsKey(operation, purpose), k -> buildMetricCollector(k.operation(), k.purpose()));
@@ -605,8 +606,8 @@ Map<String, BlobStoreActionStats> statsMap(boolean isStateless) {
605606
}
606607
}
607608

608-
IgnoreNoResponseMetricsCollector buildMetricCollector(Operation operation, OperationPurpose purpose) {
609-
return new IgnoreNoResponseMetricsCollector(operation, purpose);
609+
ElasticsearchS3MetricsCollector buildMetricCollector(Operation operation, OperationPurpose purpose) {
610+
return new ElasticsearchS3MetricsCollector(operation, purpose);
610611
}
611612
}
612613

muted-tests.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ tests:
8686
- class: org.elasticsearch.xpack.apmdata.APMYamlTestSuiteIT
8787
method: test {yaml=/10_apm/Test template reinstallation}
8888
issue: https://github.com/elastic/elasticsearch/issues/116445
89-
- class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT
90-
method: testEnterpriseDownloaderTask
91-
issue: https://github.com/elastic/elasticsearch/issues/115163
9289
- class: org.elasticsearch.versioning.ConcurrentSeqNoVersioningIT
9390
method: testSeqNoCASLinearizability
9491
issue: https://github.com/elastic/elasticsearch/issues/117249
@@ -233,9 +230,6 @@ tests:
233230
- class: org.elasticsearch.xpack.ilm.TimeSeriesLifecycleActionsIT
234231
method: testHistoryIsWrittenWithFailure
235232
issue: https://github.com/elastic/elasticsearch/issues/123203
236-
- class: org.elasticsearch.action.admin.indices.diskusage.IndexDiskUsageAnalyzerTests
237-
method: testCompletionField
238-
issue: https://github.com/elastic/elasticsearch/issues/123269
239233
- class: org.elasticsearch.packaging.test.DockerTests
240234
method: test151MachineDependentHeapWithSizeOverride
241235
issue: https://github.com/elastic/elasticsearch/issues/123437
@@ -377,9 +371,6 @@ tests:
377371
- class: org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceTests
378372
method: testIORateIsAdjustedForRunningMergeTasks
379373
issue: https://github.com/elastic/elasticsearch/issues/125842
380-
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
381-
method: test {p0=search.vectors/41_knn_search_bbq_hnsw/Test index configured rescore vector score consistency}
382-
issue: https://github.com/elastic/elasticsearch/issues/125851
383374
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
384375
method: test {p0=transform/transforms_start_stop/Verify start transform creates destination index with appropriate mapping}
385376
issue: https://github.com/elastic/elasticsearch/issues/125854
@@ -389,9 +380,24 @@ tests:
389380
- class: org.elasticsearch.xpack.ilm.TimeSeriesDataStreamsIT
390381
method: testSearchableSnapshotAction
391382
issue: https://github.com/elastic/elasticsearch/issues/125867
392-
- class: org.elasticsearch.xpack.inference.registry.ModelRegistryMetadataTests
393-
method: testUpgrade
394-
issue: https://github.com/elastic/elasticsearch/issues/125554
383+
- class: org.elasticsearch.xpack.downsample.DataStreamLifecycleDownsampleDisruptionIT
384+
method: testDataStreamLifecycleDownsampleRollingRestart
385+
issue: https://github.com/elastic/elasticsearch/issues/123769
386+
- class: org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT
387+
method: test {yaml=search.vectors/41_knn_search_bbq_hnsw/Test index configured rescore vector score consistency}
388+
issue: https://github.com/elastic/elasticsearch/issues/125902
389+
- class: org.elasticsearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT
390+
method: test {yaml=cat.allocation/10_basic/Node forecasts}
391+
issue: https://github.com/elastic/elasticsearch/issues/125848
392+
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
393+
method: test {p0=ml/start_data_frame_analytics/Test start given dest index is not empty}
394+
issue: https://github.com/elastic/elasticsearch/issues/125909
395+
- class: org.elasticsearch.indices.stats.IndexStatsIT
396+
method: testThrottleStats
397+
issue: https://github.com/elastic/elasticsearch/issues/125910
398+
- class: org.elasticsearch.xpack.esql.action.ManyShardsIT
399+
method: testCancelUnnecessaryRequests
400+
issue: https://github.com/elastic/elasticsearch/issues/125947
395401

396402
# Examples:
397403
#

0 commit comments

Comments
 (0)