-
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
SpanKind support for badger #6376
base: main
Are you sure you want to change the base?
Conversation
I have changed the structure of cache which is leading to these concerns:
Once the correct approach is discussed I will handle some more edge cases and make the e2e tests pass (making |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6376 +/- ##
==========================================
- Coverage 96.29% 96.18% -0.11%
==========================================
Files 372 373 +1
Lines 21282 21464 +182
==========================================
+ Hits 20493 20645 +152
- Misses 603 625 +22
- Partials 186 194 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@yurishkuro Please review the approach and problems! |
@yurishkuro I have added more changes which reduces the iterations in prefill to 1 but it limits the |
I have an idea for old data without using the migration script! We can store the old data in two other data structures in cache (without kind). But then the only question which rises then: What to return when no span kind is given by user? Operations of new data of all kind or operations of old data (kind marked as unspecified) or an addition of both? |
then we should return all operations regardless of the span kind |
That means including all spans of old data also (Whose kind is not there in cache)? |
My current approach is leading to errors in unit test of
This is probably because
The only problem is that, during prefilling 6*NumberOfOperations Get Queries will be called. Please review this approach @yurishkuro and I think we need to discuss about autoCreation of new index or should we skip the creation of any new index and use the function given above? |
Signed-off-by: Manik2708 <[email protected]>
@yurishkuro I finally got rid of migration and now I think its ready for review! Please ignore my previous comments. The current commit has no linkage them! |
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
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.
can you revisit the tests by using API methods of the cache instead of manually manipulating its internal data structures? Tests should be validating expected behavior that the user of the cache expects. The only time it's acceptable to go into internal details is when some error conditions cannot be tested otherwise purely from external API.
Signed-off-by: Manik2708 <[email protected]>
I have fixed all the tests except that of Update and Prefill, even they are also not manipulating the data structure, they are used just to check whether cache is storing by using the update or prefill |
@yurishkuro Can you please review? |
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Q: do we have to maintain two indices forever, or is this only a side-effect of having to be backwards compatible with the existing data? For example, one way I could see this working is:
|
The key :
Then finding the trace ids would also work fine. So either we have to create an extra index or do this extra scanning! |
This index doesn't make sense to me. It cannot effectively support a query that only includes service+operation, you must always know the Wouldn't it make more sense to append the
|
We can try this but then we need to remember that it will break these conventions:
|
Why is it "breaking" if kind introduced after Time but not "breaking" when it's before Time? Whatever we do the changes must be backwards compatible. |
Please see this: jaeger/plugin/storage/badger/spanstore/writer.go Lines 117 to 128 in 1ae9c1a
This is how we are creating a key, when |
why does it matter? We're creating an index with a different layout, we don't have to be restricted by how that specific function is implemented, especially since we are introducing a different look up process (it seems all other indices are doing direct lookup by the prefix up to the timestamp and then scan / parse). |
Ok, will give it a try and get back to you! Thanks for your time! |
Signed-off-by: Manik2708 <[email protected]>
@yurishkuro I have tried to take care of all the edge cases, please review! |
Signed-off-by: Manik2708 <[email protected]>
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test