Skip to content

Conversation

@andreidan
Copy link
Contributor

@andreidan andreidan commented Apr 10, 2025

Creating the writer to the cache of newly downloaded data can be quite involved (requires quite a few objects to be created underneath). However, this writer is only really used if we have things to download from the object store.

This proposes we delay creating the writer until it's actually needed, such that the fast path of maybeFetch...ing something avoids creating the entire machinery of SequentialRangeMissingHandler and the needed BlobCacheReader when the cache is already warm.

NB: with online prewarming we expect the cache for hot indices to be warm way more than cold (i.e. we warm each segment once and then, on every incoming search request targeting the warmed indices the maybeFetch... calls will be no-ops)

Creating the writer to the cache of newly downloaded data can be
quite involved (requires quite a few objects to be created underneath).
However, this writer is only really used if we have things to download
from the object store.

This proposes we delay creating the writer until it's actually
needed, such that the fast path of `maybeFetch...`ing something
avoids creating the entire machinery of `SequentialRangeMissingHandler`
and the needed `BlobCacheReader`.
@andreidan andreidan added >non-issue :Search Foundations/Search Catch all for Search Foundations v9.1.0 labels Apr 10, 2025
@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Apr 10, 2025
@andreidan andreidan marked this pull request as ready for review April 10, 2025 12:33
@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Apr 10, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@andreidan
Copy link
Contributor Author

Closing as we'll make use of a lazy range writer to wrap the supplier.

@andreidan andreidan closed this Apr 10, 2025
@javanna javanna removed the v9.1.0 label Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants