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

[ML] Make it easier to see when jobs/datafeeds are lazily started #54067

Closed
droberts195 opened this issue Mar 24, 2020 · 1 comment · Fixed by #55473
Closed

[ML] Make it easier to see when jobs/datafeeds are lazily started #54067

droberts195 opened this issue Mar 24, 2020 · 1 comment · Fixed by #55473
Assignees
Labels
>enhancement :ml Machine learning

Comments

@droberts195
Copy link
Contributor

This is a followup to #53763.

Currently when you start a job that has allow_lazy_open/allow_lazy_start set to true a success response does not make crystal clear whether the job has started work immediately or has started lazily and is waiting for capacity to become available.

We could make this much clearer by adding another field to the response of the open job, start datafeed and start data frame analytics job endpoints.

For example, we could have:

{
  "opened": true,
  "awaiting_lazy_assignment": true
}

{
  "started": true,
  "awaiting_lazy_assignment": true
}

{
  "acknowledged": true,
  "awaiting_lazy_assignment": true
}

Or we could use a different field name instead of awaiting_lazy_assignment.

@droberts195
Copy link
Contributor Author

We discussed this and decided to add a node field instead. The value will be an empty string if the job is not assigned to a node when the open/start call returns, and we will document why this can happen.

@droberts195 droberts195 self-assigned this Apr 1, 2020
droberts195 added a commit to droberts195/elasticsearch that referenced this issue Apr 20, 2020
Adds a "node" field to the response from the following endpoints:

1. Open anomaly detection job
2. Start datafeed
3. Start data frame analytics job

If the job or datafeed is assigned to a node immediately then
this field will return the ID of that node.

In the case where a job or datafeed is opened or started lazily
the node field will contain an empty string.  Clients that want
to test whether a job or datafeed was opened or started lazily
can therefore check for this.

Fixes elastic#54067
droberts195 added a commit that referenced this issue Apr 22, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Adds a "node" field to the response from the following endpoints:

1. Open anomaly detection job
2. Start datafeed
3. Start data frame analytics job

If the job or datafeed is assigned to a node immediately then
this field will return the ID of that node.

In the case where a job or datafeed is opened or started lazily
the node field will contain an empty string.  Clients that want
to test whether a job or datafeed was opened or started lazily
can therefore check for this.

Fixes #54067
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :ml Machine learning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant