Repository navigation
Conversation
Reads issued within count_reads_for_field are counted per (field, component) by CountingStorage. The component is the extension of the tantivy segment file read by the outermost CountingStorage (term, idx, pos, fast, fieldnorm) and is propagated to inner ones, which only see the .split file. Two counting layers in leaf search: reads missing the ephemeral cache (requested) and reads reaching object storage (download). The breakdown is returned in SplitResourceStats.field_download_stats and summed by (field_name, component).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reports warmup reads per field and segment component in
SplitResourceStats.field_download_stats(returned inSearchResponse.resource_stats).count_reads_for_field(field_name, fut)sets the field in a tokio task-local whilefutis polled. Leaf warmup wraps each per-field future (term dict, postings, positions, fast fields, fieldnorms) with it.CountingStoragecounts reads with a field set per(field_name, component), in addition to its existing totals. The component is the extension of the tantivy segment file read by the outermostCountingStorage(term,idx,pos,fast,fieldnorm). It is propagated to the innerCountingStorage, which only sees the.splitfile.requested_*: reads that missed the ephemeral cache (new layer above the fast field cache inopen_index_with_caches).download_*: reads that reached object storage (existing layer).(field_name, component)when merging split/leaf stats.Limitations:
download_num_bytesover fields is at mostSplitResourceStats.download_num_bytes.SplitResourceStatsandLeafResourceStatsare no longerCopy(repeated field).How was this PR tested?
test_counting_storage_counts_reads_per_field_component: nested counting storages, concurrently joined futures, unattributed read.test_leaf_search_reports_field_download_stats: leaf search reportsbody/term,body/idx,ts/fastwith requested bytes > 0 and field download bytes < split download bytes.test_add_split_stats_sums_every_fieldcovers merging by(field_name, component).