Explorar o código

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
c9d77d20fdb8a46b614515555d5d0697b2c6e5fc this logic would not have
worked correctly anyway.
Alexander Reelsen %!s(int64=7) %!d(string=hai) anos
pai
achega
a72dc9e8fc

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

@@ -110,16 +110,6 @@ final class WatcherIndexingListener extends AbstractComponent implements Indexin
                     return operation;
                 }
 
-                // the watch status is -1, in case a watch has been freshly stored and this save
-                // watch operation does not stem from an execution
-                // we dont need to update the trigger service, when the watch has been updated as
-                // part of an execution, so we can exit early
-                boolean isWatchExecutionOperation = watch.status().version() != -1;
-                if (isWatchExecutionOperation) {
-                    logger.debug("not updating trigger for watch [{}], watch has been updated as part of an execution", watch.id());
-                    return operation;
-                }
-
                 boolean shouldBeTriggered = shardAllocationConfiguration.shouldBeTriggered(watch.id());
                 if (shouldBeTriggered) {
                     if (watch.status().state().isActive()) {