Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-19520

couchbase-cli pump rehash only works for powers of two number of vbuckets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.0.0
    • 3.1.5, 4.1.1, 4.5.0
    • tools
    • None
    • Untriaged
    • No

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thuan Thuan Nguyen
              will.gardner Will Gardner (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty