-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[refactor][storage][badger]Refactored the prefilling of cache to reader #6575
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Manik2708 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6575 +/- ##
=======================================
Coverage 96.23% 96.24%
=======================================
Files 373 373
Lines 21406 21404 -2
=======================================
Hits 20600 20600
+ Misses 614 612 -2
Partials 192 192
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Manik2708 <[email protected]>
if _, found := r.cache.operations[service]; !found { | ||
r.cache.operations[service] = make(map[string]uint64) | ||
} | ||
|
||
if v, found := r.cache.operations[service][operationName]; found { | ||
if v > keyTTL { | ||
continue | ||
} | ||
} | ||
r.cache.operations[service][operationName] = keyTTL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you now went the other way - reader knows too much about the cache. There should be a clear API boundary between reader and cache, e.g. all the reader should be doing here is something like cache.add(service, operation)
. Just because the cache is in the same package doesn't mean the reader should be accessing its private fields like that.
please provide better description of the changes in the PR description. |
Which problem is this PR solving?
Comment: #6376 (comment)
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test