Skip to content

Commit e647611

Browse files
committed
Remove unused internal waitForAck field from UpdateJobAction
1 parent d0da950 commit e647611

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/UpdateJobAction.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public static UpdateJobAction.Request parseRequest(String jobId, XContentParser
5454

5555
/** Indicates an update that was not triggered by a user */
5656
private boolean isInternal;
57-
private boolean waitForAck = true;
5857

5958
public Request(String jobId, JobUpdate update) {
6059
this(jobId, update, false);
@@ -88,14 +87,6 @@ public boolean isInternal() {
8887
return isInternal;
8988
}
9089

91-
public boolean isWaitForAck() {
92-
return waitForAck;
93-
}
94-
95-
public void setWaitForAck(boolean waitForAck) {
96-
this.waitForAck = waitForAck;
97-
}
98-
9990
@Override
10091
public ActionRequestValidationException validate() {
10192
return null;
@@ -111,11 +102,6 @@ public void readFrom(StreamInput in) throws IOException {
111102
} else {
112103
isInternal = false;
113104
}
114-
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
115-
waitForAck = in.readBoolean();
116-
} else {
117-
waitForAck = true;
118-
}
119105
}
120106

121107
@Override
@@ -126,9 +112,6 @@ public void writeTo(StreamOutput out) throws IOException {
126112
if (out.getVersion().onOrAfter(Version.V_6_2_2)) {
127113
out.writeBoolean(isInternal);
128114
}
129-
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
130-
out.writeBoolean(waitForAck);
131-
}
132115
}
133116

134117
@Override
@@ -144,8 +127,7 @@ public boolean equals(Object o) {
144127
if (o == null || getClass() != o.getClass()) return false;
145128
UpdateJobAction.Request that = (UpdateJobAction.Request) o;
146129
return Objects.equals(jobId, that.jobId) &&
147-
Objects.equals(update, that.update) &&
148-
isInternal == that.isInternal;
130+
Objects.equals(update, that.update);
149131
}
150132

151133
@Override

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/UpdateJobActionRequestTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ protected UpdateJobAction.Request createTestInstance() {
1919
JobUpdate.Builder jobUpdate = new JobUpdate.Builder(jobId);
2020
jobUpdate.setAnalysisLimits(new AnalysisLimits(100L, 100L));
2121
UpdateJobAction.Request request = new UpdateJobAction.Request(jobId, jobUpdate.build());
22-
request.setWaitForAck(randomBoolean());
2322
return request;
2423
}
2524

0 commit comments

Comments
 (0)