Skip to content

ML: update .ml-state actions to support > 1 index #37307 #37372

Merged
benwtrent merged 4 commits intoelastic:6.xfrom
benwtrent:feature/ml-state-support-multiple-indices-backport
Jan 14, 2019
Merged

ML: update .ml-state actions to support > 1 index #37307 #37372
benwtrent merged 4 commits intoelastic:6.xfrom
benwtrent:feature/ml-state-support-multiple-indices-backport

Conversation

@benwtrent
Copy link
Copy Markdown
Member

Backport of #37307

benwtrent and others added 2 commits January 11, 2019 10:13
* ML: Updating .ml-state calls to be able to support > 1 index

* Matching bulk delete behavior with dbq

* Adjusting state name

* refreshing indices before search

* fixing line length

* adjusting index expansion options
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/ml-core

indices.add(stateIndexName);
for (ModelSnapshot modelSnapshot : modelSnapshots) {
idsToDelete.addAll(modelSnapshot.stateDocumentIds());
idsToDelete.addAll(modelSnapshot.legacyStateDocumentIds());
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply referring to the legacy docs in this query works as the DBQ request does not reference a type, so it searches across all types. Additionally, there should not be any fear of IDs conflicting from what I found the two IDs that would conflict would be jobId + "-" + quantiles and jobId + "-" + snapshotId.
This would only be if the snapshotId == "quantiles" which is very improbable if not impossible.

Copy link
Copy Markdown

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benwtrent benwtrent merged commit 2325f2f into elastic:6.x Jan 14, 2019
@benwtrent benwtrent deleted the feature/ml-state-support-multiple-indices-backport branch January 14, 2019 17:12
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 this pull request may close these issues.

3 participants