-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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 a deprecation warning regarding allocation awareness in search request #48351
Conversation
…quest This is a follow up of elastic#43453 where we added a system property to disallow allocation awareness in search requests. Since search requests will no longer check the allocation awareness attributes for routing in the next major version, this change adds a deprecation warning on any setup that uses these attributes. Relates elastic#43453
Pinging @elastic/es-search (:Search/Search) |
Pinging @elastic/es-distributed (:Distributed/Distributed) |
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.
Hmm this seems too easy :) I will try and understand what I was missing. I left one request.
@@ -77,6 +88,9 @@ void setUseAdaptiveReplicaSelection(boolean useAdaptiveReplicaSelection) { | |||
} | |||
|
|||
private void setAwarenessAttributes(List<String> awarenessAttributes) { | |||
if (this.awarenessAttributes.isEmpty() && awarenessAttributes.isEmpty() == false) { | |||
deprecationLogger.deprecated(IGNORE_AWARENESS_ATTRIBUTES_DEPRECATION_MESSAGE); |
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.
I think we should suppress this warning if es.search.ignore_awareness_attributes
is already set to true
.
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.
Good catch, in fact we should check the es.search.ignore_awareness_attributes property again since we want to ignore the attributes if it is set to true. Currently any update to the awareness attributes would make search using them even if the system property is set to true. I pushed 2cb7834 to address this.
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
@elasticmachine update branch |
This is a follow up of #43453 where we added
a system property to disallow allocation awareness in search requests. Since search requests
will no longer check the allocation awareness attributes for routing in the next major version,
this change adds a deprecation warning on any setup that uses these attributes.
Relates #43453