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] Review and upgrade static node settings and into dynamic cluster settings #33565

Closed
dimitris-athanasiou opened this issue Sep 10, 2018 · 2 comments · Fixed by #33961
Closed
Assignees
Labels

Comments

@dimitris-athanasiou
Copy link
Contributor

ML has accumulated some static node settings that make it hard for users to change. These settings require setting the setting to each node and restarting the node. For example, max.anomaly.records limits the number of records that our output per bucket to 500 by default. There has been users requesting increasing that limit. We should update that setting to be a dynamic cluster setting and deprecate the old one. At the same time, it would be good to review other similar settings.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@droberts195
Copy link
Contributor

This is something you could look at when you have a spare minute @benwtrent.

I think the settings to make dynamic and cluster-wide are:

  • AutodetectBuilder.MAX_ANOMALY_RECORDS_SETTING - new setting should be xpack.ml.max_anomaly_records
  • DataCountsReporter.ACCEPTABLE_PERCENTAGE_DATE_PARSE_ERRORS_SETTING - new setting should be xpack.ml.max_percent_date_errors
  • DataCountsReporter.ACCEPTABLE_PERCENTAGE_OUT_OF_ORDER_ERRORS_SETTING - new setting should be xpack.ml.max_percent_out_of_order_errors

(If you spot any other good candidates let me know.)

In each case, add Property.Deprecated to the existing setting together with a @Deprecated annotation, and introduce the new setting with Property.Dynamic, Property.NodeScope with the old setting as a fallback. There's an example here:

Setting.intSetting("xpack.ml.max_open_jobs", MAX_RUNNING_JOBS_PER_NODE, 1, Property.NodeScope);

Also, because the new settings are going to be dynamic, you need to store the dynamic value in a variable somewhere, and register a callback to update it when the user updates the setting. There's an example here:

.addSettingsUpdateConsumer(MachineLearning.CONCURRENT_JOB_ALLOCATIONS, this::setMaxConcurrentJobAllocations);

benwtrent added a commit to benwtrent/elasticsearch that referenced this issue Sep 21, 2018
benwtrent added a commit that referenced this issue Sep 24, 2018
* Make certain ML node settings dynamic (#33565)

* Changing to pull in updating settings and pass to constructor

* adding note about only newly opened jobs getting updated value
benwtrent added a commit that referenced this issue Sep 24, 2018
* Make certain ML node settings dynamic (#33565)

* Changing to pull in updating settings and pass to constructor

* adding note about only newly opened jobs getting updated value
kcm pushed a commit that referenced this issue Oct 30, 2018
* Make certain ML node settings dynamic (#33565)

* Changing to pull in updating settings and pass to constructor

* adding note about only newly opened jobs getting updated value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants