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

Count shards skipped on the coordinating node #86690

Closed
nik9000 opened this issue May 11, 2022 · 8 comments
Closed

Count shards skipped on the coordinating node #86690

nik9000 opened this issue May 11, 2022 · 8 comments
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@nik9000
Copy link
Member

nik9000 commented May 11, 2022

Description

#85162 is adding support for skipping TSDB indices with disjoint time ranges on the coordinating node. And we can skip them for read only indices already. It'd be useful for debugging performance issues and for testing if we got a count of the number of shards that we were able to skip on the coordinating node.

@nik9000 nik9000 added >enhancement needs:triage Requires assignment of a team area label :Search/Search Search-related issues that do not fall into other categories team-discuss and removed needs:triage Requires assignment of a team area label labels May 11, 2022
@elasticmachine elasticmachine added the Team:Search Meta label for search team label May 11, 2022
@elasticmachine
Copy link
Collaborator

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

@martijnvg
Copy link
Member

Perhaps we can report more on can match in search stats? Today we report on query and fetch level requests. Maybe we can report on the number of can match request and/or can match requests performed on the coordinating node.

@javanna
Copy link
Member

javanna commented Jun 16, 2022

@nik9000 did you mean that we should add it in each response, or in the search stats like @martijnvg suggested? Also, we already have a count of skipped shards in the search response, isn't that enough? I would like to discuss this with the team, but first, how did you envision this additional count to fit in the existing info?

@nik9000
Copy link
Member Author

nik9000 commented Jun 16, 2022

I'm interested in being able to assert on it during tests and in looking at it in SDHs.

Also, we already have a count of skipped shards in the search response, isn't that enough?

I'm having a little trouble following things, but it looks like we count any skipped shards there, but I was quite interested in shards we skipped on the coordinating node.

@javanna
Copy link
Member

javanna commented Jun 16, 2022

We discussed this with the team and some concerns were raised about adding a new count in the search response. We already have the skipped shards that include the overall count of the skipped shards whether they were skipped directly on the coordinating node or when executing can_match. While it used to be quite important that queries avoid going to the shards when the coordinating node can support skipping, as can match was executed per shard, it is now executed per node which makes it possibly less important to make a distinction about where the decision of skipping the shard was made.

Also, work on #84369 is being done which could help the supportability / debugging aspect, and we are planning to work on improved query performance analysis that should help inspect which shards were skipped at what level. With this, I would opt for closing this issue for now, but feel free to add feedback if you feel this is important and we can always reopen.

@javanna javanna closed this as completed Jun 16, 2022
@nik9000
Copy link
Member Author

nik9000 commented Jun 16, 2022

We talked about this in the search team and didn't seem super keen on doing it. We don't like that it exposes an internal detail (that we skipped on the coordinating node) but.... oh, @javanna just replied with better words than I was typing. I'm glad github sent me the update.

@martijnvg
Copy link
Member

I think in #85162 we need to find another to verify that the shard skipping happened on the coordinating node.
But I don't know whether that is possible.

@dnhatn
Copy link
Member

dnhatn commented Jun 17, 2022

@martijnvg You can intercept CanMatchNodeRequest (via MockTransportService) and tracks the list of shards that aren't skipped on the coordinating node.

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

No branches or pull requests

5 participants