Skip to content

Conversation

tteofili
Copy link
Contributor

@tteofili tteofili commented Sep 9, 2025

This adds file extension metadata to cache miss counter when that's updated by SharedBlobCacheService.
In particular this updates the es.blob_cache.miss_that_triggered_read.total counter with file extensions.
At the moment, we don't introspect into compound files, we might do it or not in the future.

@tteofili tteofili added :Search Foundations/Search Catch all for Search Foundations >enhancement labels Sep 12, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @tteofili, I've created a changelog YAML for you.

@tteofili tteofili marked this pull request as ready for review September 12, 2025 13:49
@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Sep 12, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

Thanks Tommaso. This LGTM with one mention.

Also, should we open a linked serverless PR?

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Sep 15, 2025
Comment on lines +168 to +170
@Nullable
public static boolean isLuceneExtension(String ext) {
return extensions.containsKey(ext);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this is not nullable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I'm not mistaken, IndexFileNames#getExtension might return null in case the fileName doesn't contain a ., that's why I had put the @Nullable annotation.

Copy link
Contributor

@andreidan andreidan Sep 17, 2025

Choose a reason for hiding this comment

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

Oh yes. I see what you mean.

We should @Nullable the ext method parameter ++

Being on the method it indicates the method can return null.

return LuceneFilesExtensions.CFS.getExtension();
}
try {
String extension = IndexFileNames.getExtension(resourceDescription);
Copy link
Contributor

Choose a reason for hiding this comment

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

extension can be null here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is considered in the if statement

if (LuceneFilesExtensions.isLuceneExtension(extension)) ...

so a null here will result in other extension.

@tteofili tteofili merged commit 4ec6aed into elastic:main Sep 17, 2025
34 checks passed
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Sep 17, 2025
szybia added a commit to szybia/elasticsearch that referenced this pull request Sep 17, 2025
* upstream/main: Add additional logging to make spotting stats issues easier (elastic#133972) [ESQL] Clean up ESQL enrich landing page (elastic#134820) ES|QL: Make kibana docs for Query settings more consistent (elastic#134881) Add file extension metadata to cache miss counter from SharedBlobCacheService (elastic#134374) Add IT for num_reduced_phases with batched query execution (elastic#134312) Remove `SizeValue` (elastic#134871)
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search Foundations/Search Catch all for Search Foundations serverless-linked Added by automation, don't add manually Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.2.0

4 participants