Skip to content
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

HashMod sum64 foobar #1004

Closed
miekg opened this Issue Aug 18, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@miekg
Copy link

miekg commented Aug 18, 2015

This shift that I added is wrong :(
https://github.com/prometheus/prometheus/blob/master/retrieval/relabel.go#L88

It shifts too much, discarding much of the glorious hash input. If have a PR almost ready to just do a simple xor of all the hash bytes, which looks simpler and works better. Finishing the last bit in the tests.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Aug 18, 2015

Wouldn't a XOR have bad distribution properties as well? If you just switch the position of some of the input bytes, the output hash will be the same. Basically, any permutation of the input bytes will produce the same output :)

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Aug 18, 2015

Ah I read you wrong. You want to XOR the hash, not the input.

@miekg

This comment has been minimized.

Copy link
Author

miekg commented Aug 18, 2015

yes, xor that hashed bytes.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.