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 a deprecation warning regarding allocation awareness in search request #48351

Merged
merged 4 commits into from
Oct 24, 2019

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Oct 22, 2019

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

…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
@jimczi jimczi added :Search/Search Search-related issues that do not fall into other categories >deprecation :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. v8.0.0 v7.6.0 labels Oct 22, 2019
@jimczi jimczi requested a review from DaveCTurner October 22, 2019 13:09
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Distributed)

Copy link
Contributor

@DaveCTurner DaveCTurner left a 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);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

LGTM

@jimczi
Copy link
Contributor Author

jimczi commented Oct 23, 2019

@elasticmachine update branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>deprecation :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. :Search/Search Search-related issues that do not fall into other categories v7.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants