OpenSearch/plugin/watcher
Alexander Reelsen 2da6d14859 Watcher: Prevent watch acknowledgement while watch is executing (elastic/x-pack-elasticsearch#4224)
When a watch is acknowledged, while it is also being executed, the
acknowledgment information can get lost. The reason for this is the
fact, that the execution writes the watch status inside of the watch
regardless, if other writes happened inbetween to make sure the
execution state is caught.

This commit checks the current executions in the execution service and
aborts the API call, if the specified watch ID can be found in those.

Note, this does not prevent this issue fully, as a watch could be
triggered, while the acknowledgement update is running, but it does
reduce the surface area of this problem. In order to properly solve
this, indexing the watch status as part of a watch would need to be
changed.

relates elastic/x-pack-elasticsearch#4003

Original commit: elastic/x-pack-elasticsearch@d7e218b2ac
2018-04-04 10:15:20 +02:00
..
licenses More license file corrections 2018-01-18 16:34:25 -08:00
src Watcher: Prevent watch acknowledgement while watch is executing (elastic/x-pack-elasticsearch#4224) 2018-04-04 10:15:20 +02:00
build.gradle Build: Replace provided configuration with compileOnly (elastic/x-pack-elasticsearch#3868) 2018-02-09 11:30:43 -08:00