Skip to content

Commit 94f6356

Browse files
committed
rename
1 parent 6cf8da2 commit 94f6356

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static TransportVersion def(int id) {
175175
public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED_BACKPORT_8_X = def(8_840_0_01);
176176
public static final TransportVersion ELASTICSEARCH_9_0 = def(9_000_0_00);
177177
public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED = def(9_001_0_00);
178-
public static final TransportVersion SLM_TIME_ALLOWED_SINCE_LAST_SNAPSHOT = def(9_002_0_00);
178+
public static final TransportVersion SLM_MISSING_SNAPSHOT_UNHEALTHY_THRESHOLD = def(9_002_0_00);
179179
/*
180180
* STOP! READ THIS FIRST! No, really,
181181
* ____ _____ ___ ____ _ ____ _____ _ ____ _____ _ _ ___ ____ _____ ___ ____ ____ _____ _

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/SnapshotLifecyclePolicy.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class SnapshotLifecyclePolicy implements SimpleDiffable<SnapshotLifecycle
6161
private static final ParseField REPOSITORY = new ParseField("repository");
6262
private static final ParseField CONFIG = new ParseField("config");
6363
private static final ParseField RETENTION = new ParseField("retention");
64-
private static final ParseField TIME_ALLOWED_SINCE_LAST_SNAPSHOT = new ParseField("time_allowed_since_last_snapshot");
64+
private static final ParseField MISSING_SNAPSHOT_UNHEALTHY_THRESHOLD = new ParseField("missing_snapshot_unhealthy_threshold");
6565
private static final String METADATA_FIELD_NAME = "metadata";
6666

6767
@SuppressWarnings("unchecked")
@@ -87,8 +87,8 @@ public class SnapshotLifecyclePolicy implements SimpleDiffable<SnapshotLifecycle
8787
PARSER.declareObject(ConstructingObjectParser.optionalConstructorArg(), SnapshotRetentionConfiguration::parse, RETENTION);
8888
PARSER.declareField(
8989
ConstructingObjectParser.optionalConstructorArg(),
90-
(p, c) -> TimeValue.parseTimeValue(p.text(), TIME_ALLOWED_SINCE_LAST_SNAPSHOT.getPreferredName()),
91-
TIME_ALLOWED_SINCE_LAST_SNAPSHOT,
90+
(p, c) -> TimeValue.parseTimeValue(p.text(), MISSING_SNAPSHOT_UNHEALTHY_THRESHOLD.getPreferredName()),
91+
MISSING_SNAPSHOT_UNHEALTHY_THRESHOLD,
9292
ObjectParser.ValueType.STRING
9393
);
9494
}
@@ -130,7 +130,7 @@ public SnapshotLifecyclePolicy(StreamInput in) throws IOException {
130130
this.repository = in.readString();
131131
this.configuration = in.readGenericMap();
132132
this.retentionPolicy = in.readOptionalWriteable(SnapshotRetentionConfiguration::new);
133-
this.missingSnapshotUnhealthyThreshold = in.getTransportVersion().onOrAfter(TransportVersions.SLM_TIME_ALLOWED_SINCE_LAST_SNAPSHOT)
133+
this.missingSnapshotUnhealthyThreshold = in.getTransportVersion().onOrAfter(TransportVersions.SLM_MISSING_SNAPSHOT_UNHEALTHY_THRESHOLD)
134134
? in.readOptionalTimeValue()
135135
: null;
136136
this.isCronSchedule = isCronSchedule(schedule);
@@ -394,7 +394,7 @@ public void writeTo(StreamOutput out) throws IOException {
394394
out.writeString(this.repository);
395395
out.writeGenericMap(this.configuration);
396396
out.writeOptionalWriteable(this.retentionPolicy);
397-
if (out.getTransportVersion().onOrAfter(TransportVersions.SLM_TIME_ALLOWED_SINCE_LAST_SNAPSHOT)) {
397+
if (out.getTransportVersion().onOrAfter(TransportVersions.SLM_MISSING_SNAPSHOT_UNHEALTHY_THRESHOLD)) {
398398
out.writeOptionalTimeValue(this.missingSnapshotUnhealthyThreshold);
399399
}
400400
}
@@ -412,7 +412,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
412412
builder.field(RETENTION.getPreferredName(), this.retentionPolicy);
413413
}
414414
if (this.missingSnapshotUnhealthyThreshold != null) {
415-
builder.field(TIME_ALLOWED_SINCE_LAST_SNAPSHOT.getPreferredName(), this.missingSnapshotUnhealthyThreshold);
415+
builder.field(MISSING_SNAPSHOT_UNHEALTHY_THRESHOLD.getPreferredName(), this.missingSnapshotUnhealthyThreshold);
416416
}
417417
builder.endObject();
418418
return builder;

0 commit comments

Comments
 (0)