-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Align usage of hashing functions #6136
Comments
Looking into this! :) |
There might be cases where it's OK to deviate from the standard, like for #5981. As @ydrozhdzhal mentioned:
|
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
@VineethReddy02, are you still interested in this? |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This is again up for grabs. |
Will try to find time to submit PR for this over the weekend. |
@oertl, right now, we have some usage of fnv and I'd align on that first, given there should be only a few deviating usages. I am open to discussing changing the hashing algorithm to something else. Would you please open an issue with your arguments? |
@jpkrohling I am fine with them being aligned first. I just wanted to point out that there are better hash functions available in the meantime. The alignment may be the ideal moment to switch to a better hash function. By the way, Go uses a variant of wyhash as its default hash function (see https://go.dev/src/runtime/hash64.go), which SMHasher lists among the recommended hash functions. |
@oertl, I'd happily review a PR aligning the code base with a new hash function, especially if it's well-documented that it's a better fit for our use-cases (which seems to be the case!). |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
@jmichalek132 are you still working on this? |
Actually didn't get to it at all, unfortunately. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I am keen to give it a try. |
assigned to you @amritanshu-pandey |
Some parts of the code base are using custom-made hashing functions, others are using
hash/fnv
, while others are using other things. I believe we should unify that as much as possible, hopefully withhash/fnv
as it's very performant and good enough for non-cryptographic usage.opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor/probabilisticsampler.go
Line 156 in 6e2b67b
opentelemetry-collector-contrib/processor/tailsamplingprocessor/internal/sampling/probabilistic.go
Line 18 in bff12af
opentelemetry-collector-contrib/exporter/loadbalancingexporter/consistent_hashing.go
Line 18 in a811dbb
opentelemetry-collector-contrib/processor/groupbytraceprocessor/event.go
Line 21 in a811dbb
The text was updated successfully, but these errors were encountered: