Skip to content

Route stateless term vectors requests to promotable shards #94257

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

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Mar 1, 2023

Like GET requests, we should also route term vectors requests to promotable copies in stateless.

Relates #93612

@dnhatn dnhatn added >non-issue :Search/Search Search-related issues that do not fall into other categories v8.7.1 v8.8.0 labels Mar 1, 2023
@dnhatn dnhatn requested a review from Tim-Brooks March 1, 2023 22:13
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Mar 1, 2023
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@Tim-Brooks Tim-Brooks left a comment

Choose a reason for hiding this comment

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

LGTM

@Tim-Brooks
Copy link
Contributor

I'm not super familiar with the cost of this request, but I assume we will eventually want to optimize this similar to GET #93976. Only performing on the promotable copy when required?

@dnhatn
Copy link
Member Author

dnhatn commented Mar 20, 2023

@Tim-Brooks Thanks for the review. I can look into the optimization but this API isn't as sensitive as the GET API.

@dnhatn dnhatn merged commit 5c7c71b into elastic:main Mar 20, 2023
@dnhatn dnhatn deleted the terms-vector branch March 20, 2023 05:47
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.7

dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Mar 20, 2023
Like GET requests, we should also route term vectors requests 
to promotable copies in stateless.

Relates elastic#93612
elasticsearchmachine pushed a commit that referenced this pull request Mar 20, 2023
Like GET requests, we should also route term vectors requests 
to promotable copies in stateless.

Relates #93612
} else {
return iterator;
}
return clusterService.operationRouting().useOnlyPromotableShardsForStateless(iterator);
Copy link
Member

Choose a reason for hiding this comment

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

@dnhatn are these changes to Get and MGet necessary for correctly routing term vector requests? Or is it just to make use of useOnlyPromotableShardsForStateless? I need to change this to route gets to search shards, and I am wondering whether this is needed/shared with term vectors or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

@pxsalehi The term vectors API just uses useOnlyPromotableShardsForStateless shards. Feel free to make changes to the get and mget APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.7.1 v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants