Description
Modulo should be used to convert a crc32 hash into a lower range of mappings (e.g. from the full 32bit range to 1024). The way the couchbase-cli pump currently does it is by subtracting 1 from the number of vbuckets (e.g. to 1023 == 0x3FF or the lower 10bits as 1) and using that as a bitmask.
While this works for powers of 2 like 64 and 1024 it does not work for others like 61. The couchbase-cli pump should just use Python's modulo operator instead of a bitmask.
Attachments
Issue Links
- relates to
-
MB-25666 vbucket mapping algorithm is incorrect if num vbucket is not power of 2
- Open