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

Append with CAS=0 can return ENGINE_KEY_EEXISTS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.0.1
    • 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.5.0, 5.5.1, 5.5.2, 6.0.0
    • memcached
    • None
    • Untriaged
    • Yes

    Description

      If the engine returns KEY_EEXISTS in the storeItem phase of the append/prepend statemachine, and no CAS was specified for the operation, the statemachine should be reset and the operation retried. While the current implementation does reset the statemachine, there is a bug in the function causing it to then simply return the KEY_EEXISTS error instead of retrying.

      The consequence of this is that clients may be sent back KEY_EEXISTS error code even if they don't specify a CAS; which logically shouldn't happen and hence might confuse the client (given they would not expect to have to handle such a status code).

      Workaround

      Client should retry the APPEND / PREPEND operation (as if they had used an explicit CAS value in their request).

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-32078
          # Subject Branch Project Status CR V

          Activity

            People

              anitha.kuberan Anitha Kuberan
              sven.signer Sven Signer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty