Add a deprecation warning regarding allocation awareness in search request#48351
Add a deprecation warning regarding allocation awareness in search request#48351jimczi merged 4 commits intoelastic:7.xfrom
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) |
DaveCTurner
left a comment
There was a problem hiding this comment.
Hmm this seems too easy :) I will try and understand what I was missing. I left one request.
|
|
||
| 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.
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.
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.
|
@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