Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2966 +/- ##
==========================================
+ Coverage 78.54% 78.65% +0.10%
==========================================
Files 74 74
Lines 44039 44123 +84
==========================================
+ Hits 34591 34704 +113
+ Misses 9448 9419 -29 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| `hits / (hits + misses)`; read failures are excluded. JSON statistics expose | ||
| the failure count as `stats.multi_level[].read_failures`. | ||
|
|
||
| Completed reads are counted even if a later level stalls and the lookup is |
There was a problem hiding this comment.
this is an implementation detail for users, maybe just drop this paragraph?
| Completed reads are counted even if a later level stalls and the lookup is | ||
| cancelled. A still-pending read is not counted as a completed outcome. | ||
|
|
||
| Read failures do not change fallback behavior: the next level is tried, and |
There was a problem hiding this comment.
could be shorter, something like "Read failures still fall back to the next level; they are not part of Cache read errors."
| l1.put("hit", CacheWrite::default()).await.unwrap(); | ||
| assert!(storage.get_raw("hit").await.unwrap().is_some()); | ||
| for raw in [false, true] { | ||
| for (chain, expected) in [ |
There was a problem hiding this comment.
the "me"/"eh" char encoding is a bit cryptic, maybe add a one-line comment for m/e/h? :)
| let stats = storage.stats(); | ||
| assert_read_outcomes(&stats, &expected); | ||
|
|
||
| let mut merged = stats.clone(); |
There was a problem hiding this comment.
the merge + serde roundtrip doesn't depend on the chain, maybe move it into its own small test?
this test is already doing a lot
| } | ||
| assert_read_outcomes(&storage.stats(), &[(0, 1, 0), (0, 0, 1), (0, 0, 0)]); | ||
| } | ||
| assert_read_outcomes(&storage.stats(), &[(0, 1, 0), (0, 0, 1), (0, 0, 0)]); |
There was a problem hiding this comment.
same assert as the one in the block, dropping the future can't change the counters. do we need both?
Previously, failed reads from individual cache tiers were counted as misses.
This PR introduces a per-tier
read_failuresmetric.Fallback behavior is unchanged.