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

tryBuildIndex() can submit all pending index builds at once due to negative quota

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      There are several problems in lifecycle.go's tryBuildIndex() function:

      1. A partitioned index can cause newQuota to go negative, because every partition in INDEX_STATE_READY decrements this, whereas it should only be decremented once for the entire index. The negative quota will then trigger submission of all pending index builds at once.
      2. If the batchSize config parameter is reduced, this can also cause a negative newQuota value to occur with same side effect.
      3. If background build is disabled, a partitioned index will append defnId back onto pendingList N times instead of just once, where N is the number of partitions.

      Attachments

        Issue Links

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

          Activity

            People

              kevin.cherkauer Kevin Cherkauer (Inactive)
              kevin.cherkauer Kevin Cherkauer (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