Skip to content

Commit a72dc9e

Browse files
authored
Watcher: Remove never executed code (#31135)
The removed code snippet was never executed, as the version was never set and thus always -1, after parsing the watch. With the changes done in c9d77d2 this logic would not have worked correctly anyway.
1 parent 08b8d11 commit a72dc9e

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherIndexingListener.java

-10
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,6 @@ public Engine.Index preIndex(ShardId shardId, Engine.Index operation) {
110110
return operation;
111111
}
112112

113-
// the watch status is -1, in case a watch has been freshly stored and this save
114-
// watch operation does not stem from an execution
115-
// we dont need to update the trigger service, when the watch has been updated as
116-
// part of an execution, so we can exit early
117-
boolean isWatchExecutionOperation = watch.status().version() != -1;
118-
if (isWatchExecutionOperation) {
119-
logger.debug("not updating trigger for watch [{}], watch has been updated as part of an execution", watch.id());
120-
return operation;
121-
}
122-
123113
boolean shouldBeTriggered = shardAllocationConfiguration.shouldBeTriggered(watch.id());
124114
if (shouldBeTriggered) {
125115
if (watch.status().state().isActive()) {

0 commit comments

Comments
 (0)