Skip to content

Commit 83bbefd

Browse files
authored
Merge branch 'main' into caller-class
2 parents aa7e633 + 2f1c857 commit 83bbefd

File tree

18 files changed

+121
-84
lines changed

18 files changed

+121
-84
lines changed

build-conventions/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
plugins {
11-
id "com.gradle.develocity" version "3.18.1"
11+
id "com.gradle.develocity" version "3.19.2"
1212
}
1313

1414
rootProject.name = 'build-conventions'

build-tools-internal/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pluginManagement {
99
}
1010

1111
plugins {
12-
id "com.gradle.develocity" version "3.18.1"
12+
id "com.gradle.develocity" version "3.19.2"
1313
}
1414

1515
dependencyResolutionManagement {

build-tools/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pluginManagement {
1010
includeBuild "../build-conventions"
1111
}
1212
plugins {
13-
id "com.gradle.develocity" version "3.18.1"
13+
id "com.gradle.develocity" version "3.19.2"
1414
}
1515
include 'reaper'
1616

gradle/build.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ checkstyle = "com.puppycrawl.tools:checkstyle:10.3"
1616
commmons-io = "commons-io:commons-io:2.2"
1717
docker-compose = "com.avast.gradle:gradle-docker-compose-plugin:0.17.5"
1818
forbiddenApis = "de.thetaphi:forbiddenapis:3.8"
19-
gradle-enterprise = "com.gradle:develocity-gradle-plugin:3.18.1"
19+
gradle-enterprise = "com.gradle:develocity-gradle-plugin:3.19.2"
2020
hamcrest = "org.hamcrest:hamcrest:2.1"
2121
httpcore5 = "org.apache.httpcomponents.core5:httpcore5:5.3.3"
2222
httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.4.2"

gradle/verification-metadata.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -814,14 +814,9 @@
814814
<sha256 value="48234cd74e35d91a31a683820a35b5b6d11b55527f32a5b162c6757408b95d7a" origin="Generated by Gradle"/>
815815
</artifact>
816816
</component>
817-
<component group="com.gradle" name="develocity-gradle-plugin" version="3.17.4">
818-
<artifact name="develocity-gradle-plugin-3.17.4.jar">
819-
<sha256 value="e2b3f8a191b0b401b75c2c4542d3d1719814a4212e6920fae4f2f940678bfd99" origin="Generated by Gradle"/>
820-
</artifact>
821-
</component>
822-
<component group="com.gradle" name="develocity-gradle-plugin" version="3.18.1">
823-
<artifact name="develocity-gradle-plugin-3.18.1.jar">
824-
<sha256 value="0adf32afef4ae46a131367e393d18a5d9529750dfd1432287797a64b2c36c7ef" origin="Generated by Gradle"/>
817+
<component group="com.gradle" name="develocity-gradle-plugin" version="3.19.2">
818+
<artifact name="develocity-gradle-plugin-3.19.2.jar">
819+
<sha256 value="fc611e8858a901619831ea1d9efd289db7fea28a0ca3d091abdd363365d9512b" origin="Generated by Gradle"/>
825820
</artifact>
826821
</component>
827822
<component group="com.gradleup.shadow" name="shadow-gradle-plugin" version="8.3.5">

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,6 @@ tests:
285285
- class: org.elasticsearch.smoketest.MlWithSecurityIT
286286
method: test {yaml=ml/start_data_frame_analytics/Test start classification analysis when the dependent variable is missing}
287287
issue: https://github.com/elastic/elasticsearch/issues/124168
288-
- class: org.elasticsearch.search.fieldcaps.FieldCapabilitiesIT
289-
method: testRelocation
290-
issue: https://github.com/elastic/elasticsearch/issues/124227
291288
- class: org.elasticsearch.smoketest.MlWithSecurityIT
292289
method: test {yaml=ml/3rd_party_deployment/Test start and stop multiple deployments}
293290
issue: https://github.com/elastic/elasticsearch/issues/124315

plugins/examples/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
plugins {
11-
id "com.gradle.develocity" version "3.18.1"
11+
id "com.gradle.develocity" version "3.19.2"
1212
}
1313

1414
// Include all subdirectories as example projects

server/src/internalClusterTest/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
import java.util.concurrent.atomic.AtomicBoolean;
8585
import java.util.function.Consumer;
8686
import java.util.function.Function;
87+
import java.util.function.Predicate;
8788
import java.util.stream.IntStream;
8889

8990
import static java.util.Collections.singletonList;
@@ -557,11 +558,14 @@ public void testNoActiveCopy() throws Exception {
557558
}
558559
}
559560

560-
private void moveOrCloseShardsOnNodes(String nodeName) throws Exception {
561+
private void moveOrCloseShardsOnNodes(String nodeName, Predicate<String> indexName) throws Exception {
561562
final IndicesService indicesService = internalCluster().getInstance(IndicesService.class, nodeName);
562563
final ClusterState clusterState = clusterService().state();
563564
for (IndexService indexService : indicesService) {
564565
for (IndexShard indexShard : indexService) {
566+
if (indexName.test(indexShard.shardId().getIndexName()) == false) {
567+
continue;
568+
}
565569
if (randomBoolean()) {
566570
closeShardNoCheck(indexShard, randomBoolean());
567571
} else if (randomBoolean()) {
@@ -603,13 +607,21 @@ private void moveOrCloseShardsOnNodes(String nodeName) throws Exception {
603607

604608
public void testRelocation() throws Exception {
605609
populateTimeRangeIndices();
610+
assertAcked(
611+
client().admin()
612+
.indices()
613+
.prepareUpdateSettings("log-index-*")
614+
.setSettings(Settings.builder().put("index.routing.rebalance.enable", "none").build())
615+
.get()
616+
);
617+
ensureGreen("log-index-*");
606618
try {
607619
final AtomicBoolean relocated = new AtomicBoolean();
608620
for (String node : internalCluster().getNodeNames()) {
609621
MockTransportService.getInstance(node)
610622
.addRequestHandlingBehavior(TransportFieldCapabilitiesAction.ACTION_NODE_NAME, (handler, request, channel, task) -> {
611623
if (relocated.compareAndSet(false, true)) {
612-
moveOrCloseShardsOnNodes(node);
624+
moveOrCloseShardsOnNodes(node, indexName -> indexName.startsWith("log-index-"));
613625
}
614626
handler.messageReceived(request, channel, task);
615627
});

server/src/main/java/org/elasticsearch/action/get/TransportGetAction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,18 @@ protected Writeable.Reader<GetResponse> getResponseReader() {
167167
}
168168

169169
@Override
170-
protected Executor getExecutor(GetRequest request, ShardId shardId) {
170+
protected Executor getExecutor(ShardId shardId) {
171171
final ClusterState clusterState = clusterService.state();
172172
if (projectResolver.getProjectMetadata(clusterState).getIndexSafe(shardId.getIndex()).isSystem()) {
173173
return threadPool.executor(executorSelector.executorForGet(shardId.getIndexName()));
174174
} else {
175-
return super.getExecutor(request, shardId);
175+
return super.getExecutor(shardId);
176176
}
177177
}
178178

179179
private void asyncGet(GetRequest request, ShardId shardId, ActionListener<GetResponse> listener) throws IOException {
180180
if (request.refresh() && request.realtime() == false) {
181-
getExecutor(request, shardId).execute(ActionRunnable.wrap(listener, l -> {
181+
getExecutor(shardId).execute(ActionRunnable.wrap(listener, l -> {
182182
var indexShard = getIndexShard(shardId);
183183
indexShard.externalRefresh("refresh_flag_get", l.map(r -> shardOperation(request, shardId)));
184184
}));
@@ -300,7 +300,7 @@ private void tryGetFromTranslog(GetRequest request, IndexShard indexShard, Disco
300300
indexShard.waitForPrimaryTermAndGeneration(r.primaryTerm(), r.segmentGeneration(), termAndGenerationListener);
301301
}
302302
}
303-
}), TransportGetFromTranslogAction.Response::new, getExecutor(request, shardId))
303+
}), TransportGetFromTranslogAction.Response::new, getExecutor(shardId))
304304
);
305305
}
306306

server/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, Sha
156156
}
157157

158158
@Override
159-
protected Executor getExecutor(MultiGetShardRequest request, ShardId shardId) {
159+
protected Executor getExecutor(ShardId shardId) {
160160
final ClusterState clusterState = clusterService.state();
161161
if (projectResolver.getProjectMetadata(clusterState).index(shardId.getIndex()).isSystem()) {
162162
return threadPool.executor(executorSelector.executorForGet(shardId.getIndexName()));
163163
} else {
164-
return super.getExecutor(request, shardId);
164+
return super.getExecutor(shardId);
165165
}
166166
}
167167

@@ -290,7 +290,7 @@ private void tryShardMultiGetFromTranslog(
290290
assert r.primaryTerm() > Engine.UNKNOWN_PRIMARY_TERM;
291291
final ActionListener<Long> termAndGenerationListener = ContextPreservingActionListener.wrapPreservingContext(
292292
listener.delegateFailureAndWrap(
293-
(ll, aLong) -> getExecutor(request, shardId).execute(
293+
(ll, aLong) -> getExecutor(shardId).execute(
294294
ActionRunnable.supply(ll, () -> handleLocalGets(request, r.multiGetShardResponse(), shardId))
295295
)
296296
),
@@ -299,7 +299,7 @@ private void tryShardMultiGetFromTranslog(
299299
indexShard.waitForPrimaryTermAndGeneration(r.primaryTerm(), r.segmentGeneration(), termAndGenerationListener);
300300
}
301301
}
302-
}), TransportShardMultiGetFomTranslogAction.Response::new, getExecutor(request, shardId))
302+
}), TransportShardMultiGetFomTranslogAction.Response::new, getExecutor(shardId))
303303
);
304304
}
305305

@@ -353,7 +353,7 @@ private void getAndAddToResponse(
353353
private void asyncShardMultiGet(MultiGetShardRequest request, ShardId shardId, ActionListener<MultiGetShardResponse> listener)
354354
throws IOException {
355355
if (request.refresh() && request.realtime() == false) {
356-
getExecutor(request, shardId).execute(ActionRunnable.wrap(listener, l -> {
356+
getExecutor(shardId).execute(ActionRunnable.wrap(listener, l -> {
357357
var indexShard = getIndexShard(shardId);
358358
indexShard.externalRefresh("refresh_flag_mget", l.map(r -> shardOperation(request, shardId)));
359359
}));

0 commit comments

Comments
 (0)