Skip to content

Commit 9c3c0fb

Browse files
authored
Merge branch 'main' into ivf_hkmeans_struc2
2 parents 13a0007 + 65788cb commit 9c3c0fb

File tree

9 files changed

+123
-6
lines changed

9 files changed

+123
-6
lines changed

muted-tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,6 @@ tests:
545545
- class: org.elasticsearch.qa.verify_version_constants.VerifyVersionConstantsIT
546546
method: testLuceneVersionConstant
547547
issue: https://github.com/elastic/elasticsearch/issues/125638
548-
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
549-
method: test
550-
issue: https://github.com/elastic/elasticsearch/issues/129819
551548
- class: org.elasticsearch.index.store.FsDirectoryFactoryTests
552549
method: testPreload
553550
issue: https://github.com/elastic/elasticsearch/issues/129852
@@ -575,6 +572,11 @@ tests:
575572
- class: org.elasticsearch.cluster.metadata.ComposableIndexTemplateTests
576573
method: testMergeEmptyMappingsIntoTemplateWithNonEmptySettings
577574
issue: https://github.com/elastic/elasticsearch/issues/130050
575+
- class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT
576+
method: test
577+
issue: https://github.com/elastic/elasticsearch/issues/130067
578+
- class: geoip.GeoIpMultiProjectIT
579+
issue: https://github.com/elastic/elasticsearch/issues/130073
578580

579581
# Examples:
580582
#

qa/mixed-cluster/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ apply plugin: 'elasticsearch.rest-resources'
2323

2424
dependencies {
2525
restTestConfig project(path: ':modules:aggregations', configuration: 'restTests')
26+
restTestConfig project(path: ':modules:mapper-extras', configuration: 'restTests')
2627
}
2728

2829
restResources {
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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.cluster.routing.allocation;
11+
12+
import org.elasticsearch.action.ActionListener;
13+
import org.elasticsearch.cluster.routing.RerouteService;
14+
import org.elasticsearch.common.Priority;
15+
import org.elasticsearch.common.settings.Setting;
16+
import org.elasticsearch.common.unit.RatioValue;
17+
import org.elasticsearch.core.TimeValue;
18+
19+
/**
20+
* Settings definitions for the write load allocation decider and associated infrastructure
21+
*/
22+
public class WriteLoadConstraintSettings {
23+
24+
private static final String SETTING_PREFIX = "cluster.routing.allocation.write_load_decider.";
25+
26+
public enum WriteLoadDeciderStatus {
27+
/**
28+
* The decider is disabled
29+
*/
30+
DISABLED,
31+
/**
32+
* Only the low-threshold is enabled (write-load will not trigger rebalance)
33+
*/
34+
LOW_ONLY,
35+
/**
36+
* The decider is enabled
37+
*/
38+
ENABLED
39+
}
40+
41+
public static final Setting<WriteLoadDeciderStatus> WRITE_LOAD_DECIDER_ENABLED_SETTING = Setting.enumSetting(
42+
WriteLoadDeciderStatus.class,
43+
SETTING_PREFIX + "enabled",
44+
WriteLoadDeciderStatus.DISABLED,
45+
Setting.Property.Dynamic,
46+
Setting.Property.NodeScope
47+
);
48+
49+
/**
50+
* The threshold over which we consider write thread pool utilization "high"
51+
*/
52+
public static final Setting<RatioValue> WRITE_LOAD_DECIDER_HIGH_UTILIZATION_THRESHOLD_SETTING = new Setting<>(
53+
SETTING_PREFIX + "high_utilization_threshold",
54+
"90%",
55+
RatioValue::parseRatioValue,
56+
Setting.Property.Dynamic,
57+
Setting.Property.NodeScope
58+
);
59+
60+
/**
61+
* The duration for which we need to see "high" utilization before we consider the low threshold exceeded
62+
*/
63+
public static final Setting<TimeValue> WRITE_LOAD_DECIDER_HIGH_UTILIZATION_DURATION_SETTING = Setting.timeSetting(
64+
SETTING_PREFIX + "high_utilization_duration",
65+
TimeValue.timeValueMinutes(10),
66+
Setting.Property.Dynamic,
67+
Setting.Property.NodeScope
68+
);
69+
70+
/**
71+
* When the decider is {@link WriteLoadDeciderStatus#ENABLED}, the write-load monitor will call
72+
* {@link RerouteService#reroute(String, Priority, ActionListener)} when we see tasks being delayed by this amount of time
73+
* (but no more often than {@link #WRITE_LOAD_DECIDER_REROUTE_INTERVAL_SETTING})
74+
*/
75+
public static final Setting<TimeValue> WRITE_LOAD_DECIDER_QUEUE_LATENCY_THRESHOLD_SETTING = Setting.timeSetting(
76+
SETTING_PREFIX + "queue_latency_threshold",
77+
TimeValue.timeValueSeconds(30),
78+
Setting.Property.Dynamic,
79+
Setting.Property.NodeScope
80+
);
81+
82+
/**
83+
* How often the data node calculates the write-loads for the individual shards
84+
*/
85+
public static final Setting<TimeValue> WRITE_LOAD_DECIDER_SHARD_WRITE_LOAD_POLLING_INTERVAL_SETTING = Setting.timeSetting(
86+
SETTING_PREFIX + "shard_write_load_polling_interval",
87+
TimeValue.timeValueSeconds(60),
88+
Setting.Property.Dynamic,
89+
Setting.Property.NodeScope
90+
);
91+
92+
/**
93+
* The minimum amount of time between successive calls to reroute to address write load hot-spots
94+
*/
95+
public static final Setting<TimeValue> WRITE_LOAD_DECIDER_REROUTE_INTERVAL_SETTING = Setting.timeSetting(
96+
SETTING_PREFIX + "reroute_interval",
97+
TimeValue.timeValueSeconds(60),
98+
Setting.Property.Dynamic,
99+
Setting.Property.NodeScope
100+
);
101+
}

server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.elasticsearch.cluster.routing.OperationRouting;
4747
import org.elasticsearch.cluster.routing.allocation.DataTier;
4848
import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings;
49+
import org.elasticsearch.cluster.routing.allocation.WriteLoadConstraintSettings;
4950
import org.elasticsearch.cluster.routing.allocation.allocator.AllocationBalancingRoundSummaryService;
5051
import org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator;
5152
import org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceComputer;
@@ -643,6 +644,12 @@ public void apply(Settings value, Settings current, Settings previous) {
643644
DataStreamFailureStoreSettings.DATA_STREAM_FAILURE_STORED_ENABLED_SETTING,
644645
IndexingStatsSettings.RECENT_WRITE_LOAD_HALF_LIFE_SETTING,
645646
SearchStatsSettings.RECENT_READ_LOAD_HALF_LIFE_SETTING,
646-
TransportGetAllocationStatsAction.CACHE_TTL_SETTING
647+
TransportGetAllocationStatsAction.CACHE_TTL_SETTING,
648+
WriteLoadConstraintSettings.WRITE_LOAD_DECIDER_ENABLED_SETTING,
649+
WriteLoadConstraintSettings.WRITE_LOAD_DECIDER_HIGH_UTILIZATION_THRESHOLD_SETTING,
650+
WriteLoadConstraintSettings.WRITE_LOAD_DECIDER_HIGH_UTILIZATION_DURATION_SETTING,
651+
WriteLoadConstraintSettings.WRITE_LOAD_DECIDER_QUEUE_LATENCY_THRESHOLD_SETTING,
652+
WriteLoadConstraintSettings.WRITE_LOAD_DECIDER_SHARD_WRITE_LOAD_POLLING_INTERVAL_SETTING,
653+
WriteLoadConstraintSettings.WRITE_LOAD_DECIDER_REROUTE_INTERVAL_SETTING
647654
);
648655
}

server/src/main/java/org/elasticsearch/index/engine/Engine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ public void close() throws IOException {
21992199
awaitPendingClose();
22002200
}
22012201

2202-
private void awaitPendingClose() {
2202+
protected final void awaitPendingClose() {
22032203
try {
22042204
closedLatch.await();
22052205
} catch (InterruptedException e) {

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public abstract class GenerativeRestTest extends ESRestTestCase {
5050
"Plan \\[ProjectExec\\[\\[<no-fields>.* optimized incorrectly due to missing references", // https://github.com/elastic/elasticsearch/issues/125866
5151
"optimized incorrectly due to missing references", // https://github.com/elastic/elasticsearch/issues/116781
5252
"The incoming YAML document exceeds the limit:", // still to investigate, but it seems to be specific to the test framework
53+
"Data too large", // Circuit breaker exceptions eg. https://github.com/elastic/elasticsearch/issues/130072
5354

5455
// Awaiting fixes for correctness
5556
"Expecting the following columns \\[.*\\], got", // https://github.com/elastic/elasticsearch/issues/129000

x-pack/plugin/inference/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,3 +405,7 @@ tasks.named("thirdPartyAudit").configure {
405405
tasks.named('yamlRestTest') {
406406
usesDefaultDistribution("Uses the inference API")
407407
}
408+
409+
artifacts {
410+
restXpackTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test"))
411+
}

x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/src/yamlRestTest/java/org/elasticsearch/multiproject/test/CoreWithMultipleProjectsClientYamlTestSuiteIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
1919
import org.junit.ClassRule;
2020

21-
@TimeoutSuite(millis = 30 * TimeUnits.MINUTE)
21+
@TimeoutSuite(millis = 45 * TimeUnits.MINUTE)
2222
public class CoreWithMultipleProjectsClientYamlTestSuiteIT extends MultipleProjectsClientYamlSuiteTestCase {
2323

2424
@ClassRule

x-pack/rest-resources-zip/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ dependencies {
2727
platinumTests project(path: ':x-pack:plugin', configuration: 'restXpackTests')
2828
platinumTests project(path: ':x-pack:plugin:eql:qa:rest', configuration: 'restXpackTests')
2929
platinumTests project(path: ':x-pack:plugin:ent-search', configuration: 'restXpackTests')
30+
platinumTests project(path: ':x-pack:plugin:inference', configuration: 'restXpackTests')
3031
platinumCompatTests project(path: ':x-pack:plugin', configuration: 'restCompatTests')
3132
platinumCompatTests project(path: ':x-pack:plugin:eql:qa:rest', configuration: 'restCompatTests')
3233
}

0 commit comments

Comments
 (0)