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

[6.8][ML] Fixes for stop datafeed edge cases #49290

Merged
merged 2 commits into from
Nov 20, 2019

Conversation

droberts195
Copy link
Contributor

The following edge cases were fixed:

  1. A request to force-stop a stopping datafeed is no longer
    ignored. Force-stop is an important recovery mechanism
    if normal stop doesn't work for some reason, and needs
    to operate on a datafeed in any state other than stopped.
  2. If the node that a datafeed is running on is removed from
    the cluster during a normal stop then the stop request is
    retried (and will likely succeed on this retry by simply
    cancelling the persistent task for the affected datafeed).
  3. If there are multiple simultaneous force-stop requests for
    the same datafeed we no longer fail the one that is
    processed second. The previous behaviour was wrong as
    stopping a stopped datafeed is not an error, so stopping
    a datafeed twice simultaneously should not be either.

Backport of #49191

The following edge cases were fixed:

1. A request to force-stop a stopping datafeed is no longer
   ignored.  Force-stop is an important recovery mechanism
   if normal stop doesn't work for some reason, and needs
   to operate on a datafeed in any state other than stopped.
2. If the node that a datafeed is running on is removed from
   the cluster during a normal stop then the stop request is
   retried (and will likely succeed on this retry by simply
   cancelling the persistent task for the affected datafeed).
3. If there are multiple simultaneous force-stop requests for
   the same datafeed we no longer fail the one that is
   processed second.  The previous behaviour was wrong as
   stopping a stopped datafeed is not an error, so stopping
   a datafeed twice simultaneously should not be either.

Backport of elastic#49191
@droberts195 droberts195 added :ml Machine learning backport labels Nov 19, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

@droberts195 droberts195 changed the title [ML] Fixes for stop datafeed edge cases [6.8][ML] Fixes for stop datafeed edge cases Nov 19, 2019
@droberts195
Copy link
Contributor Author

Jenkins run elasticsearch-ci/2

1 similar comment
@droberts195
Copy link
Contributor Author

Jenkins run elasticsearch-ci/2

If a datafeed is stopped normally and force stopped at the same
time then it is possible that the force stop removes the
persistent task while the normal stop is performing actions.
Currently this causes the normal stop to error, but since
stopping a stopped datafeed is not an error this doesn't make
sense. Instead the force stop should just take precedence.
@droberts195 droberts195 merged commit 546a3b8 into elastic:6.8 Nov 20, 2019
@droberts195 droberts195 deleted the fix_stop_datafeed_edge_cases_68 branch November 20, 2019 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :ml Machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants