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

Unable to lookup or set document body and xattr in single subdoc operation

    XMLWordPrintable

Details

    Description

      Unable to get or set full document body and xattr in a single operation, when using gocb.

      Attempting to set the path to "" for the document body portion of the SUBDOC_MULTI_LOOKUP or SUBDOC_MULTI_MUTATION operation results in an 'invalid arguments' error, which appears to be gocb's translation of statusCode(0x04).

      gocb code to for the attempted upsert:

      docFragment, err := bucket.Bucket.MutateIn(k, 0, uint32(exp)).
      UpsertEx("sync", xv, gocb.SubdocFlagXattr|gocb.SubdocFlagCreatePath).
       UpsertEx("", v, gocb.SubdocFlagNone).
       Execute()

       

       Based on my review of the gocb code, it's not complaining about the empty path - the request gets sent to the server successfully.  

      I'm getting the same error (invalid arguments) when trying to do a lookup of doc body and XATTR in a single multi_lookup.

       

      Attachments

        Issue Links

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

          Activity

            People

              jaekwon.park Jae Park [X] (Inactive)
              adamf Adam Fraser
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty