ML: update .ml-state actions to support > 1 index#37307
Merged
benwtrent merged 7 commits intoelastic:masterfrom Jan 11, 2019
Merged
ML: update .ml-state actions to support > 1 index#37307benwtrent merged 7 commits intoelastic:masterfrom
benwtrent merged 7 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/ml-core |
droberts195
reviewed
Jan 10, 2019
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java
Outdated
Show resolved
Hide resolved
|
|
||
| bulkRequestBuilder.add(client.prepareDelete(AnomalyDetectorsIndex.jobResultsAliasedName(modelSnapshot.getJobId()), | ||
| ElasticsearchMappings.DOC_TYPE, ModelSnapshot.documentId(modelSnapshot))); | ||
| idsToDelete.addAll(modelSnapshot.stateDocumentIds()); |
There was a problem hiding this comment.
I think the 6.x version of this method also adds legacy v5.4 doc IDs. It's probably best to raise a separate PR for the 6.x backport so we can review the 6.x code separately. There may be other places where 5.x legacy is handled differently in 6.x.
Member
Author
There was a problem hiding this comment.
Sounds good to me, handling these whacky IDs is tricky. In current, the way we write the IDs prevents us from having duplicate IDs in different Indexes, not sure that is the case in v5.
Member
Author
|
run the gradle build tests 2 |
benwtrent
added a commit
that referenced
this pull request
Jan 14, 2019
* ML: update .ml-state actions to support > 1 index (#37307) * 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 * Adjusting for backport * fixing minor test bug * fixing test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For smoother upgrades in the future, and the ability to have more than one state index, certain actions needed to be adjusted so that having more than one state index would not break key features.
This addresses some (not all) of the points in #29938
Namely: