-
Notifications
You must be signed in to change notification settings - Fork 599
ingester: use a 64-bit hash to avoid collisions #5276
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
ingester: use a 64-bit hash to avoid collisions #5276
Conversation
0df8471
to
c6bc1fa
Compare
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.
Changes lgtm and I didn't see any other references to fnv.New32 that need to be removed (only still used by compaction sharding).
Can you add a test that covers some of the found/known colliding IDs and make sure they work as expected?
We had this issue in the distributor, it it can happen in the ingester too with live traces.
2b72893
to
3080025
Compare
@mdisibio I've added a test to check for collisions. I've also run the same test in main and the same span IDs where found in multiple traces, so I can confirm that this fixes the issue for live traces. |
* ingester: use a 64-bit hash to avoid collisions We had this issue in the distributor, it it can happen in the ingester too with live traces. * Update changelog * Add test for live traces collision
* ingester: use a 64-bit hash to avoid collisions We had this issue in the distributor, it it can happen in the ingester too with live traces. * Update changelog * Add test for live traces collision
* ingester: use a 64-bit hash to avoid collisions We had this issue in the distributor, it it can happen in the ingester too with live traces. * Update changelog * Add test for live traces collision
We had this issue in the distributor (#5186), it it can happen in the ingester too with live traces.
In the ingester we use a map to store live traces where the key is a hash of the Trace ID. Because we were using 32-bit hashes, in cases where tens of thousands of traces were pushed, there was a high chance of collision in which case spans from different traces would be incorrectly combined. By using a 64-bit we minimize the collision chance.
What this PR does:
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]