Skip to content

Commit

Permalink
Watcher: Remove never executed code (#31135)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
spinscale authored Jun 26, 2018
1 parent 08b8d11 commit a72dc9e
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,6 @@ public Engine.Index preIndex(ShardId shardId, Engine.Index operation) {
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()) {
Expand Down

0 comments on commit a72dc9e

Please sign in to comment.