Skip to content

Commit b7dfa21

Browse files
committed
support task cancel
1 parent ab8ca06 commit b7dfa21

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/rollup/action/RollupShardStatus.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,8 @@ public void init(AtomicLong numReceived, AtomicLong numSent, AtomicLong numIndex
107107
this.numFailed = numFailed;
108108
}
109109

110-
public Status getStatus() {
111-
return status;
112-
}
113-
114-
public void setStatus(Status status) {
115-
this.status = status;
110+
public void setFinished() {
111+
this.status = Status.FINISHED;
116112
}
117113

118114
public boolean isCancelled() {

x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/v2/RollupShardIndexer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ public RollupIndexerAction.ShardRollupResponse execute() throws IOException {
166166
+ "]."
167167
);
168168
}
169+
170+
status.setFinished();
169171
return new RollupIndexerAction.ShardRollupResponse(indexShard.shardId(), numIndexed.get());
170172
}
171173

0 commit comments

Comments
 (0)