refactor: fair hit-rate for registry - #499
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 0-scoped-cache #499 +/- ##
===============================================
Coverage 71.53% 71.54%
===============================================
Files 240 240
Lines 20187 20166 -21
===============================================
- Hits 14441 14427 -14
+ Misses 4657 4655 -2
+ Partials 1089 1084 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
db078cd to
150212c
Compare
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
150212c to
eff1f40
Compare
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
eff1f40 to
26500e8
Compare
26500e8 to
f0205cd
Compare
f0205cd to
cd89962
Compare
cd89962 to
b10b266
Compare
| "can't open legacy index file", | ||
| zap.String("file", name), | ||
| zap.Error(err), | ||
| f.legacyReader = storage.NewIndexReader( |
There was a problem hiding this comment.
nit: Here the reader is not used, so there’s no need to initialise it. Even if it’s used somewhere later, it’s better to move the initialisation to that place.
I’d also remove it entirely from the permanent properties of Sealed.legacyReader.
| f.openInfoLegacy() | ||
| f.legacyFile = f.openFileIfNeeded(f.legacyFile, f.BaseFileName+consts.IndexFileSuffix) | ||
|
|
||
| f.legacyReader = storage.NewIndexReader( |
There was a problem hiding this comment.
nit: I understand this is a one-time load, but for consistency, I would also create a reader via Session here.
I'd make it local (not a property of Sealed).
I also suggest doing the same for remote.
Description
In this PR I've reintroduced fix for too high registry cache hit-rate.
If you have used LLM/AI assistance please provide model name and full prompt:
Stack created with GitHub Stacks CLI • Give Feedback 💬