Skip to content

Commit aa02208

Browse files
committed
Merge remote-tracking branch 'elastic/master' into pr/37940
* elastic/master: ILM setPriority corrections for a 0 value (elastic#38001) Temporarily disable BWC for retention lease stats (elastic#38049) Skip Shrink when numberOfShards not changed (elastic#37953) Add dispatching to `HandledTransportAction` (elastic#38050) Update httpclient for JDK 11 TLS engine (elastic#37994) Reduce flaxiness of ccr recovery timeouts test (elastic#38035) Fix ILM status to allow unknown fields (elastic#38043) Fix ILM Lifecycle Policy to allow unknown fields (elastic#38041) Update verify repository to allow unknown fields (elastic#37619) [ML] Datafeed deprecation checks (elastic#38026) Deprecate minimum_master_nodes (elastic#37868) Remove types from watcher docs (elastic#38002) Add test coverage for Painless general casting of boolean and Boolean (elastic#37780) Fixed test bug, lastFollowTime is null if there are no follower indices. Add ECS schema for user-agent ingest processor (elastic#37727) (elastic#37984) Extract TransportRequestDeduplication from ShardStateAction (elastic#37870)
2 parents 38bff33 + dad41c2 commit aa02208

File tree

167 files changed

+1510
-799
lines changed

Some content is hidden

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

167 files changed

+1510
-799
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ task verifyVersions {
159159
* the enabled state of every bwc task. It should be set back to true
160160
* after the backport of the backcompat code is complete.
161161
*/
162-
final boolean bwc_tests_enabled = true
163-
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
162+
final boolean bwc_tests_enabled = false
163+
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/37991" /* place a PR link here when committing bwc changes */
164164
if (bwc_tests_enabled == false) {
165165
if (bwc_tests_disabled_issue.isEmpty()) {
166166
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,18 +373,15 @@ class ClusterFormationTasks {
373373
'path.repo' : "${node.sharedDir}/repo",
374374
'path.shared_data' : "${node.sharedDir}/",
375375
// Define a node attribute so we can test that it exists
376-
'node.attr.testattr' : 'test'
376+
'node.attr.testattr' : 'test',
377+
// Don't wait for state, just start up quickly. This will also allow new and old nodes in the BWC case to become the master
378+
'discovery.initial_state_timeout' : '0s'
377379
]
378380
int minimumMasterNodes = node.config.minimumMasterNodes.call()
379-
if (minimumMasterNodes > 0) {
381+
if (node.nodeVersion.before("7.0.0") && minimumMasterNodes > 0) {
380382
esConfig['discovery.zen.minimum_master_nodes'] = minimumMasterNodes
381383
}
382-
if (minimumMasterNodes > 1) {
383-
// don't wait for state.. just start up quickly
384-
// this will also allow new and old nodes in the BWC case to become the master
385-
esConfig['discovery.initial_state_timeout'] = '0s'
386-
}
387-
if (esConfig.containsKey('discovery.zen.master_election.wait_for_joins_timeout') == false) {
384+
if (node.nodeVersion.before("7.0.0") && esConfig.containsKey('discovery.zen.master_election.wait_for_joins_timeout') == false) {
388385
// If a node decides to become master based on partial information from the pinging, don't let it hang for 30 seconds to correct
389386
// its mistake. Instead, only wait 5s to do another round of pinging.
390387
// This is necessary since we use 30s as the default timeout in REST requests waiting for cluster formation

buildSrc/version.properties

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@ joda = 2.10.1
2121
# test dependencies
2222
randomizedrunner = 2.7.1
2323
junit = 4.12
24-
httpclient = 4.5.2
25-
# When updating httpcore, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
26-
httpcore = 4.4.5
27-
# When updating httpasyncclient, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
28-
httpasyncclient = 4.1.2
24+
httpclient = 4.5.7
25+
httpcore = 4.4.11
26+
httpasyncclient = 4.1.4
2927
commonslogging = 1.1.3
30-
commonscodec = 1.10
28+
commonscodec = 1.11
3129
hamcrest = 1.3
3230
securemock = 1.2
33-
# When updating mocksocket, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
3431
mocksocket = 1.2
3532

3633
# benchmark dependencies

client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/AllocateAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class AllocateAction implements LifecycleAction, ToXContentObject {
4040
static final ParseField REQUIRE_FIELD = new ParseField("require");
4141

4242
@SuppressWarnings("unchecked")
43-
private static final ConstructingObjectParser<AllocateAction, Void> PARSER = new ConstructingObjectParser<>(NAME,
43+
private static final ConstructingObjectParser<AllocateAction, Void> PARSER = new ConstructingObjectParser<>(NAME, true,
4444
a -> new AllocateAction((Integer) a[0], (Map<String, String>) a[1], (Map<String, String>) a[2], (Map<String, String>) a[3]));
4545

4646
static {

client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/DeleteAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
public class DeleteAction implements LifecycleAction, ToXContentObject {
3131
public static final String NAME = "delete";
3232

33-
private static final ObjectParser<DeleteAction, Void> PARSER = new ObjectParser<>(NAME, DeleteAction::new);
33+
private static final ObjectParser<DeleteAction, Void> PARSER = new ObjectParser<>(NAME, true, DeleteAction::new);
3434

3535
public static DeleteAction parse(XContentParser parser) {
3636
return PARSER.apply(parser, null);

client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/ForceMergeAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class ForceMergeAction implements LifecycleAction, ToXContentObject {
3333
private static final ParseField MAX_NUM_SEGMENTS_FIELD = new ParseField("max_num_segments");
3434

3535
private static final ConstructingObjectParser<ForceMergeAction, Void> PARSER = new ConstructingObjectParser<>(NAME,
36-
false, a -> {
36+
true, a -> {
3737
int maxNumSegments = (int) a[0];
3838
return new ForceMergeAction(maxNumSegments);
3939
});

client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/FreezeAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
public class FreezeAction implements LifecycleAction, ToXContentObject {
3030
public static final String NAME = "freeze";
3131

32-
private static final ObjectParser<FreezeAction, Void> PARSER = new ObjectParser<>(NAME, FreezeAction::new);
32+
private static final ObjectParser<FreezeAction, Void> PARSER = new ObjectParser<>(NAME, true, FreezeAction::new);
3333

3434
public static FreezeAction parse(XContentParser parser) {
3535
return PARSER.apply(parser, null);

client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/LifecycleManagementStatusResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class LifecycleManagementStatusResponse {
3434
private static final String OPERATION_MODE = "operation_mode";
3535
@SuppressWarnings("unchecked")
3636
private static final ConstructingObjectParser<LifecycleManagementStatusResponse, Void> PARSER = new ConstructingObjectParser<>(
37-
OPERATION_MODE, a -> new LifecycleManagementStatusResponse((String) a[0]));
37+
OPERATION_MODE, true, a -> new LifecycleManagementStatusResponse((String) a[0]));
3838

3939
static {
4040
PARSER.declareString(ConstructingObjectParser.constructorArg(), new ParseField(OPERATION_MODE));

client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/LifecyclePolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class LifecyclePolicy implements ToXContentObject {
4444
static final ParseField PHASES_FIELD = new ParseField("phases");
4545

4646
@SuppressWarnings("unchecked")
47-
public static ConstructingObjectParser<LifecyclePolicy, String> PARSER = new ConstructingObjectParser<>("lifecycle_policy", false,
47+
public static ConstructingObjectParser<LifecyclePolicy, String> PARSER = new ConstructingObjectParser<>("lifecycle_policy", true,
4848
(a, name) -> {
4949
List<Phase> phases = (List<Phase>) a[0];
5050
Map<String, Phase> phaseMap = phases.stream().collect(Collectors.toMap(Phase::getName, Function.identity()));

client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/LifecyclePolicyMetadata.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public class LifecyclePolicyMetadata implements ToXContentObject {
3838
static final ParseField MODIFIED_DATE = new ParseField("modified_date");
3939

4040
@SuppressWarnings("unchecked")
41-
public static final ConstructingObjectParser<LifecyclePolicyMetadata, String> PARSER = new ConstructingObjectParser<>("policy_metadata",
41+
public static final ConstructingObjectParser<LifecyclePolicyMetadata, String> PARSER = new ConstructingObjectParser<>(
42+
"policy_metadata", true,
4243
a -> {
4344
LifecyclePolicy policy = (LifecyclePolicy) a[0];
4445
return new LifecyclePolicyMetadata(policy, (long) a[1], ZonedDateTime.parse((String) a[2]).toInstant().toEpochMilli());

0 commit comments

Comments
 (0)