You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/05/17 04:18:35 UTC

[GitHub] massakam opened a new pull request #1795: Fix C++ MurmurHash3 algorithm

massakam opened a new pull request #1795: Fix C++ MurmurHash3 algorithm
URL: https://github.com/apache/incubator-pulsar/pull/1795
 
 
   ### Motivation
   
   I noticed that messages with the same key might be routed to different partitions when MurmurHash3 was selected as a hashing scheme in the C++ client library.
   This is because there is a mistake in C++ implementation of MurmurHash3.
   
   ### Modifications
   
   Fixed `Murmur3_32Hash.cc` by reference to the following SMHasher code.
   https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash3.cpp#L94-L146
   
   ### Result
   
   The same key generates the same hash, and messages with the same key are routed to the same partition.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services