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

[FTS] - partition assignment "nudging" is wrong

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • 6.5.0
    • 5.5.0
    • fts
    • None
    • Untriaged
    • Unknown

    Description

      Thanks Sreekanth Sivasankaran – Sreekanth helped to raise attention that the cbgt "node list" nudging algorithm is wrong...

      https://github.com/couchbase/cbgt/blob/master/manager_planner.go#L671
      manager_planner.go:671

      The idea is that it takes the indexName,
      then computes a hash num,
      then uses that hash num to naively rotate or shift the array of nodes around
      so that each index might have a different looking but repeatable-ish array of node names as it goes into the rest of the (blance) partition planning algorithm.

      The bug is here...

      https://github.com/couchbase/cbgt/blob/master/manager_planner.go#L683

          if next >= len(nodeUUIDsAll) {
      			next = 0
      		}
      

      It should probably more use a modulus, perhaps like...

         if next >= len(nodeUUIDsAll) {
            next = next mod len(nodeUUIDsAll)
         }
      

      (Related, when the involved numbers are low, like there's only a single partition per index, and only two nodes, then this nudging or list rotation approach might not be enough – but we can consider that separately perhaps in some future improvement ticket.)

      Attachments

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

        Activity

          People

            steve Steve Yen
            steve Steve Yen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty