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

Emperfect code around vbucket state on commands

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 1.7.0
    • 1.6.0 beta4
    • couchbase-bucket
    • None
    • Operating System: All
      Platform: All

    Description

      There is currently a hole where a vbucket that transitions between a pending state and another state after the pending state check in a given command which leads the command to thinking that it can proceed even though the vbucket changes state.

      Of course, the vbucket can continue to change state at any point throughout this request, so this is not a fatal condition.

      RCPtr<VBucket> vb = getVBucket(vbucket);
      if (!vb || vb->getState() == dead)

      { return GetValue(ENGINE_NOT_MY_VBUCKET); } else if (vb->getState() == active) { // OK } else if(vb->getState() == replica) { return GetValue(ENGINE_NOT_MY_VBUCKET); }

      else if(vb->getState() == pending) {

      // bug is in on this line of code

      if (vb->addPendingOp(cookie))

      { return GetValue(ENGINE_EWOULDBLOCK); }

      }

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            dustin@sallings.org Dustin Sallings (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty