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

XATTR CAS Macro is incorrect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.0.0
    • 5.0.0
    • couchbase-bucket
    • None
    • Untriaged
    • Unknown

    Description

      When performing a subdocument operation using Macro-Expansion to replace `${Mutation.CAS}` with the new CAS of the document, the value written into the document doesn't match the CAS of the document.

      I perform a document upsert:
      SET `testXattr` TO `{"x": "xattrs"}`

      I perform a sub-document mutation:
      SUBDOC_MUTATE `testXattr`
        DICT_SET(XATTR_PATH | MKDIR_P) `xatest.test` TO `"test value"`
        DICT_SET(XATTR_PATH | EXPAND_MACROS) `xatest.rev` TO `"${Mutation.CAS}"`
        DICT_SET() `x` TO `"x value"`

      I perform a sub-document lookup:
      SUBDOC_LOOKUP `testXattr`:
        GET(XATTR_PATH) `xatest`
        GET() `x`

      And the results are the following:
      CAS = 0x149b717d56330000
      RESULT 0: `{"test":"test value","rev":"0xd80f0f20dfb94b3d"}`
      RESULT 1: `"x value"`

      Attachments

        Issue Links

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

          Activity

            People

              trond Trond Norbye
              brett19 Brett Lawson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty