-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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] Create the ml-config index #36608
[ML] Create the ml-config index #36608
Conversation
Pinging @elastic/ml-core |
13d67ca
to
5a74edf
Compare
e0e73a1
to
fabe447
Compare
fabe447
to
3f607d7
Compare
Retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments.
@@ -90,6 +94,7 @@ | |||
private static final Logger logger = LogManager.getLogger(MlConfigMigrator.class); | |||
|
|||
public static final String MIGRATED_FROM_VERSION = "migrated from version"; | |||
public static final int CONFIG_INDEX_MAX_RESULTS_WINDOW = 10_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This setting is misplaced here. Could you move it to AnomalyDetectorsIndex
please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we should take the chance and raise this to 100K?
* datafeed configuration document | ||
* | ||
* The number of datafeeds returned in a search it limited to | ||
* {@link MlConfigMigrator#CONFIG_INDEX_MAX_RESULTS_WINDOW}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need updating once the setting is moved.
@@ -89,6 +90,11 @@ | |||
/** | |||
* This class implements CRUD operation for the | |||
* anomaly detector job configuration document | |||
* | |||
* The number of jobs returned in a search it limited to | |||
* {@link MlConfigMigrator#CONFIG_INDEX_MAX_RESULTS_WINDOW}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need updating once the setting is moved.
run gradle build tests 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closing as #36792 replaces this |
Create the
.ml-config
index in the migrator class if it does not exist and require the existence of the index for the jobs/datafeeds are eligible to be migrated checks. The index is created only if there are job and datafeed configs to migrate.The created index has
index.max_result_window
explicitly set to 10,000 and the template has the same setting. The classes that search the index for configs use that value to set the search size.Addressed #34864