fix: classify coalesced cache misses in PageGetExecutor#82
Merged
Conversation
Greptile SummaryThis PR fixes cache miss classification for coalesced requests by leveraging
The implementation correctly sets Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PageGetExecutor.execute] --> B[Increment access metric]
B --> C[cache.get_or_fetch]
C --> D{Cache hit or miss?}
D -->|Miss - no cached entry| E[Run fetch closure]
E --> F[Set fetched_by_current_request = true]
F --> G[Download from S3]
G --> H[Increment download metric]
H --> I[Return CacheValue with cached_at = now]
D -->|Hit or coalesced| J[Return existing/coalescing entry]
I --> K[Check entry.source]
J --> K
K --> L{Source type?}
L -->|Source::Memory| M[CacheHit + CacheHitMemory metrics]
L -->|Source::Disk| N[CacheHit + CacheHitDisk metrics]
L -->|Source::Outer + fetched=true| O[Leader miss - no metric]
L -->|Source::Outer + fetched=false| P[Coalesced metric]
M --> Q[Keep cached_at timestamp]
N --> Q
O --> R[Set cached_at = 0]
P --> R
Q --> S[Return page data]
R --> S
Last reviewed commit: 4ef682a |
Member
Author
|
@greptileai re-review |
Merged
shikhar
pushed a commit
that referenced
this pull request
Feb 20, 2026
## 🤖 New release * `cachey`: 0.10.2 -> 0.10.3 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.10.3](0.10.2...0.10.3) - 2026-02-20 ### Fixed - *(types)* reject control characters in bucket names ([#84](#84)) - *(object_store)* merge per-request timeout and retry overrides ([#85](#85)) - classify coalesced cache misses in PageGetExecutor ([#82](#82)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
PageGetExecutor.foyerentry source.cachey_page_request_total{type="coalesced"}.cache_hit_memorycache_hit_diskwhile keeping aggregate
cache_hit.PageRequestTypeand export it publicly.Validation
cargo +nightly fmtcargo clippy --all-features --all-targets -- -D warnings --allow deprecatedcargo nextest run --libCloses #70