Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watcher: Remove never executed code #31135

Merged
merged 2 commits into from
Jun 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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