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

Add ML associated indices #69492

Merged
merged 5 commits into from
Mar 1, 2021
Merged

Conversation

gwbrown
Copy link
Contributor

@gwbrown gwbrown commented Feb 23, 2021

These somehow got dropped from the initial Feature States PR, so this
commit adds them again.


Note for reviewers: If you are not familiar with associated indices, they are new as of #63513. See this comment:

/**
* Returns a list of index patterns for "associated indices": indices which depend on this plugin's system indices, but are not
* themselves system indices.
*
* @return A list of index patterns which depend on the contents of this plugin's system indices, but are not themselves system indices
*/

They are currently only used for ensuring all of a feature's indices are included in snapshots that specify they should include that feature's state - that is, if a plugin's system indices are included in a snapshot, that plugin's associated indices will be as well. They will also be used for the upcoming reset API (see #69469).

These somehow got dropped from the initial Feature States PR, so this
commit adds them again.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@@ -1217,6 +1218,11 @@ public static SystemIndexDescriptor getInferenceIndexSecurityDescriptor() {
.build();
}

@Override
public Collection<String> getAssociatedIndexPatterns() {
return List.of(RESULTS_INDEX_PREFIX + "*", STATE_INDEX_PREFIX + "*", ".ml-notifications*", ".ml-annotations*");
Copy link
Contributor

Choose a reason for hiding this comment

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

Also .ml-stats*.

Copy link
Contributor

@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

@gwbrown
Copy link
Contributor Author

gwbrown commented Mar 1, 2021

@elasticmachine update branch

@gwbrown gwbrown merged commit 6a2d6b4 into elastic:master Mar 1, 2021
@gwbrown gwbrown deleted the si/ml-associated-indices branch March 1, 2021 17:20
gwbrown added a commit to gwbrown/elasticsearch that referenced this pull request Mar 1, 2021
ML's associated indices somehow got dropped from the initial Feature States PR, so this
commit adds them again.
gwbrown added a commit that referenced this pull request Mar 1, 2021
ML's associated indices somehow got dropped from the initial Feature States PR, so this
commit adds them again.
gwbrown added a commit that referenced this pull request Mar 1, 2021
ML's associated indices somehow got dropped from the initial Feature States PR, so this
commit adds them again.
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.

4 participants