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

Allow subdoc lookups to return both an xattrs and $document

    XMLWordPrintable

Details

    Description

      Summary
      KV currently supports fetching a maximum of one xattrs root fields in a single subdoc lookup request.

      This has become a blocker for transactions, and this ticket is to request that lookups be allowed to return both an xattrs field and $document.

       

      Context

      When a document is fetched inside a transaction, it's implemented as a subdoc lookup which needs to return:

      a) the document's body

      b) several fields from the "txn" xattr that stores the transactional metadata

      c) $document, as several fields (revid, cas, exptime) are needed from this for the restore process

      Unfortunately the "txn" xattr and $document xattr cannot be fetched together currently, due to the above restriction.

      After an initial chat with Dave Rigby I understand that there are good future-proofing reasons for not being able to fetch two xattr fields at once (including that they may need to be stored separately on-disk at a later date), but that this restriction could potentially be lifted for $document, as its virtualised and will never require a potential disk fetch.

       

      Preferred timescale

      I know it's very late in the day, but if there's any chance this could be completed for the Mad Hatter beta, I'll be able to implement the transaction-backup plan previously agreed.

      Attachments

        Issue Links

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

          Activity

            People

              ashwin.govindarajulu Ashwin Govindarajulu
              graham.pople Graham Pople
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty