-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Migrate to data tiers routing configures correct default for mounted indices #97936
Conversation
/** | ||
* Returns true iff the given settings have a data tier setting configured | ||
*/ | ||
public static boolean isExplicitDataTier(Settings settings) { | ||
/* | ||
* This method can be called before the o.e.n.NodeRoleSettings.NODE_ROLES_SETTING is | ||
* initialized. We do not want to trigger initialization prematurely because that will bake | ||
* the default roles before plugins have had a chance to register them. Therefore, | ||
* to avoid initializing this setting prematurely, we avoid using the actual node roles | ||
* setting instance here in favor of the string. | ||
*/ | ||
if (settings.hasValue("node.roles")) { | ||
return settings.getAsList("node.roles").stream().anyMatch(DataTier::validTierName); | ||
} | ||
return false; | ||
} |
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 is an unused method
Hi @andreidan, I've created a changelog YAML for you. |
Pinging @elastic/es-data-management (Team:Data Management) |
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, thanks for fixing this Andrei
💔 Backport failed
You can use sqren/backport to manually backport by running |
…indices (elastic#97936) (cherry picked from commit 1f24b9d) Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
This fixes the default tier preference configuration the
migrate to tier routing API sets for fully and partially mounted
indices when the index was not migrated using the requested
attribute name and it doesn't have any
_tier_preference
setting configured.
Fixes #97898