-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Can match phase coordinator duration APM metric #136828
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
Can match phase coordinator duration APM metric #136828
Conversation
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
|
Hi @chrisparrinello, I've created a changelog YAML for you. |
server/src/main/java/org/elasticsearch/action/search/CanMatchPreFilterSearchPhase.java
Outdated
Show resolved
Hide resolved
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
d9e923a to
3fd1850
Compare
3fd1850 to
76844ec
Compare
server/src/main/java/org/elasticsearch/action/search/CanMatchPreFilterSearchPhase.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/search/TransportSearchShardsAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/search/CanMatchPreFilterSearchPhase.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/search/CanMatchPreFilterSearchPhase.java
Outdated
Show resolved
Hide resolved
javanna
left a comment
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.
left a couple of nits on testing, LGTM otherwise
|
|
||
| public void testPointInTimeWithPreFiltering() { | ||
| OpenPointInTimeRequest request = new OpenPointInTimeRequest(indexName).keepAlive(TimeValue.timeValueMinutes(10)); | ||
| request.indexFilter(simpleQueryStringQuery("doc1")); |
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.
could you use a more realistic index filter? For instance a date range query instead? I was also wondering if setting the index filter is required for this test to work.
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 changed it to a more complicated test. For this test to have two runs of can-match, we need to make sure we have at least two shards remaining after the open PIT can match. We have to have and index filter on the open PIT for can-match to run during that operation.
...rc/test/java/org/elasticsearch/rest/action/search/SearchPhaseCoordinatorAPMMetricsTests.java
Show resolved
Hide resolved
Add a new APM metric to measure the duration of the can-match phase at the coordinator: es.search_response.took_durations.can_match.histogram
Add a new APM metric to measure the duration of the can-match phase at the coordinator: