Skip to content

Commit 8dd6894

Browse files
committed
Merge branch 'main' into lucene_snapshot
2 parents 6d8ace6 + 0a10581 commit 8dd6894

File tree

132 files changed

+1582
-378
lines changed

Some content is hidden

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

132 files changed

+1582
-378
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public void execute(Task t) {
120120
"--add-opens=java.base/java.nio.file=ALL-UNNAMED",
121121
"--add-opens=java.base/java.time=ALL-UNNAMED",
122122
"--add-opens=java.management/java.lang.management=ALL-UNNAMED",
123+
"--enable-native-access=ALL-UNNAMED",
123124
"-XX:+HeapDumpOnOutOfMemoryError"
124125
);
125126

docs/changelog/126581.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pr: 126581
2+
summary: "Optimize shared blob cache evictions on shard removal
3+
Shared blob cache evictions occur on the cluster applier thread when shards are
4+
removed from a node. These can be expensive if a large number of shards are
5+
being removed. This change uses the context of the removal to avoid unnecessary
6+
evictions that might hold up the applier thread.
7+
"
8+
area: Snapshot/Restore
9+
type: enhancement
10+
issues: []

docs/reference/elasticsearch/mapping-reference/parent-join.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
2+
applies_to:
3+
serverless: unavailable
24
navigation_title: "Join"
35
mapped_pages:
46
- https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html
57
---
68

79
# Join field type [parent-join]
810

9-
1011
The `join` data type is a special field that creates parent/child relation within documents of the same index. The `relations` section defines a set of possible relations within the documents, each relation being a parent name and a child name.
1112

1213
::::{warning}

libs/x-content/src/main/java/org/elasticsearch/xcontent/XContentString.java

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

modules/repository-s3/src/javaRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3MinioBasicCredentialsRestIT.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121

2222
import java.util.Locale;
2323

24-
import static org.elasticsearch.repositories.s3.S3Service.REPOSITORY_S3_CAS_ANTI_CONTENTION_DELAY_SETTING;
25-
import static org.elasticsearch.repositories.s3.S3Service.REPOSITORY_S3_CAS_TTL_SETTING;
26-
2724
@ThreadLeakFilters(filters = { TestContainersThreadFilter.class })
2825
@ThreadLeakScope(ThreadLeakScope.Scope.NONE) // https://github.com/elastic/elasticsearch/issues/102482
2926
public class RepositoryS3MinioBasicCredentialsRestIT extends AbstractRepositoryS3RestTestCase {
@@ -42,10 +39,6 @@ public class RepositoryS3MinioBasicCredentialsRestIT extends AbstractRepositoryS
4239
.keystore("s3.client." + CLIENT + ".access_key", ACCESS_KEY)
4340
.keystore("s3.client." + CLIENT + ".secret_key", SECRET_KEY)
4441
.setting("s3.client." + CLIENT + ".endpoint", minioFixture::getAddress)
45-
// Skip listing of pre-existing uploads during a CAS because MinIO sometimes leaks them; also reduce the delay before proceeding
46-
// TODO do not set these if running a MinIO version in which https://github.com/minio/minio/issues/21189 is fixed
47-
.setting(REPOSITORY_S3_CAS_TTL_SETTING.getKey(), "-1")
48-
.setting(REPOSITORY_S3_CAS_ANTI_CONTENTION_DELAY_SETTING.getKey(), "100ms")
4942
.build();
5043

5144
@ClassRule

muted-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,6 @@ tests:
426426
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT
427427
method: testOneRemoteClusterPartial
428428
issue: https://github.com/elastic/elasticsearch/issues/124055
429-
- class: org.elasticsearch.compute.aggregation.SampleDoubleAggregatorFunctionTests
430-
method: testSimpleWithCranky
431-
issue: https://github.com/elastic/elasticsearch/issues/128024
432429
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT
433430
method: test {lookup-join.MvJoinKeyOnTheLookupIndex ASYNC}
434431
issue: https://github.com/elastic/elasticsearch/issues/128030
@@ -474,9 +471,6 @@ tests:
474471
- class: org.elasticsearch.packaging.test.TemporaryDirectoryConfigTests
475472
method: test21AcceptsCustomPathInDocker
476473
issue: https://github.com/elastic/elasticsearch/issues/128114
477-
- class: org.elasticsearch.xpack.esql.qa.single_node.PushQueriesIT
478-
method: testEqualityAndOther {semantic_text}
479-
issue: https://github.com/elastic/elasticsearch/issues/128414
480474
- class: org.elasticsearch.xpack.ml.integration.InferenceIngestIT
481475
method: testPipelineIngestWithModelAliases
482476
issue: https://github.com/elastic/elasticsearch/issues/128417
@@ -489,6 +483,9 @@ tests:
489483
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithFiltersIT
490484
method: testTimestampFilterFromQuery
491485
issue: https://github.com/elastic/elasticsearch/issues/127332
486+
- class: org.elasticsearch.xpack.esql.plugin.DataNodeRequestSenderIT
487+
method: testSearchWhileRelocating
488+
issue: https://github.com/elastic/elasticsearch/issues/128500
492489

493490
# Examples:
494491
#

plugins/examples/custom-suggester/src/main/java/org/elasticsearch/example/customsuggester/CustomSuggester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import org.apache.lucene.search.IndexSearcher;
1313
import org.apache.lucene.util.CharsRefBuilder;
14-
import org.elasticsearch.xcontent.Text;
14+
import org.elasticsearch.common.text.Text;
1515
import org.elasticsearch.search.suggest.Suggest;
1616
import org.elasticsearch.search.suggest.Suggester;
1717

plugins/examples/custom-suggester/src/main/java/org/elasticsearch/example/customsuggester/CustomSuggestion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import org.elasticsearch.common.io.stream.StreamInput;
1313
import org.elasticsearch.common.io.stream.StreamOutput;
14-
import org.elasticsearch.xcontent.Text;
14+
import org.elasticsearch.common.text.Text;
1515
import org.elasticsearch.search.suggest.Suggest;
1616
import org.elasticsearch.xcontent.ParseField;
1717
import org.elasticsearch.xcontent.XContentBuilder;

server/src/internalClusterTest/java/org/elasticsearch/plugins/IndexFoldersDeletionListenerIT.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.elasticsearch.index.IndexSettings;
2323
import org.elasticsearch.index.shard.ShardId;
2424
import org.elasticsearch.indices.IndicesService;
25+
import org.elasticsearch.indices.cluster.IndexRemovalReason;
2526
import org.elasticsearch.test.ESIntegTestCase;
2627
import org.elasticsearch.test.junit.annotations.TestLogging;
2728

@@ -345,12 +346,22 @@ public static class IndexFoldersDeletionListenerPlugin extends Plugin implements
345346
public List<IndexFoldersDeletionListener> getIndexFoldersDeletionListeners() {
346347
return List.of(new IndexFoldersDeletionListener() {
347348
@Override
348-
public void beforeIndexFoldersDeleted(Index index, IndexSettings indexSettings, Path[] indexPaths) {
349+
public void beforeIndexFoldersDeleted(
350+
Index index,
351+
IndexSettings indexSettings,
352+
Path[] indexPaths,
353+
IndexRemovalReason reason
354+
) {
349355
deletedIndices.add(index);
350356
}
351357

352358
@Override
353-
public void beforeShardFoldersDeleted(ShardId shardId, IndexSettings indexSettings, Path[] shardPaths) {
359+
public void beforeShardFoldersDeleted(
360+
ShardId shardId,
361+
IndexSettings indexSettings,
362+
Path[] shardPaths,
363+
IndexRemovalReason reason
364+
) {
354365
deletedShards.computeIfAbsent(shardId.getIndex(), i -> Collections.synchronizedList(new ArrayList<>())).add(shardId);
355366
}
356367
});

server/src/main/java/org/elasticsearch/bootstrap/BootstrapChecks.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.apache.logging.log4j.LogManager;
1313
import org.apache.logging.log4j.Logger;
1414
import org.apache.lucene.util.Constants;
15+
import org.elasticsearch.Build;
1516
import org.elasticsearch.cluster.coordination.ClusterBootstrapService;
1617
import org.elasticsearch.common.ReferenceDocs;
1718
import org.elasticsearch.common.settings.Setting;
@@ -37,6 +38,7 @@
3738
import java.util.Collections;
3839
import java.util.List;
3940
import java.util.Locale;
41+
import java.util.function.BooleanSupplier;
4042
import java.util.function.Predicate;
4143
import java.util.stream.Collectors;
4244
import java.util.stream.Stream;
@@ -75,7 +77,11 @@ static void check(
7577
combinedChecks.addAll(additionalChecks);
7678
check(
7779
context,
78-
enforceLimits(boundTransportAddress, DiscoveryModule.DISCOVERY_TYPE_SETTING.get(context.settings())),
80+
enforceLimits(
81+
boundTransportAddress,
82+
DiscoveryModule.DISCOVERY_TYPE_SETTING.get(context.settings()),
83+
Build.current()::isSnapshot
84+
),
7985
Collections.unmodifiableList(combinedChecks)
8086
);
8187
}
@@ -172,17 +178,23 @@ static void log(final Logger logger, final String error) {
172178
}
173179

174180
/**
175-
* Tests if the checks should be enforced.
181+
* Tests if the checks should be enforced. \
182+
* Bootstrap checks are enforced (in production builds) if a non-loopback address is configured and a non-snapshot build is used.
176183
*
177184
* @param boundTransportAddress the node network bindings
178185
* @param discoveryType the discovery type
186+
* @param isSnapshot provider to test if this build is snapshot or not
179187
* @return {@code true} if the checks should be enforced
180188
*/
181-
static boolean enforceLimits(final BoundTransportAddress boundTransportAddress, final String discoveryType) {
189+
static boolean enforceLimits(
190+
final BoundTransportAddress boundTransportAddress,
191+
final String discoveryType,
192+
final BooleanSupplier isSnapshot
193+
) {
182194
final Predicate<TransportAddress> isLoopbackAddress = t -> t.address().getAddress().isLoopbackAddress();
183195
final boolean bound = (Arrays.stream(boundTransportAddress.boundAddresses()).allMatch(isLoopbackAddress)
184196
&& isLoopbackAddress.test(boundTransportAddress.publishAddress())) == false;
185-
return bound && SINGLE_NODE_DISCOVERY_TYPE.equals(discoveryType) == false;
197+
return bound && isSnapshot.getAsBoolean() == false && SINGLE_NODE_DISCOVERY_TYPE.equals(discoveryType) == false;
186198
}
187199

188200
// the list of checks to execute

0 commit comments

Comments
 (0)