-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref: Add CacheEntry type and use it for SymCaches and PpdbCaches #929
Conversation
This changes `SymCacheActor::fetch` and `PortablePdbCacheActor::fetch` so that they return a `CacheEntry` (plus auxiliary information, i.e. candidates and features).
crates/symbolicator-service/src/services/symbolication/module_lookup.rs
Outdated
Show resolved
Hide resolved
Codecov ReportBase: 64.87% // Head: 64.54% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #929 +/- ##
==========================================
- Coverage 64.87% 64.54% -0.33%
==========================================
Files 68 68
Lines 11797 12012 +215
==========================================
+ Hits 7653 7753 +100
- Misses 4144 4259 +115
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This adds a new enum
CacheEntry
that is intended to eventually replace the current representation of cache entries as (essentially) a pair of(CacheStatus, ByteView)
and the myriad different errors. As a first step, we use it inSymCacheActor::fetch
andPortablePdbCacheActor::fetch
and consequently also in themodule_lookup
module. The code in the latter becomes slightly simpler, in my opinion, but the big win is that we parse the caches only once and from then on pass around the parsed object instead of using aByteView
that has to be parsed over and over again.This currently requires a development version of symbolic because some additional traits have to be implemented for
PortablePdbCache
.EDIT: The most recent version replaces the custom
CacheEntry
enum with aResult
. The semantics stay exactly the same.