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

DCP_OPEN_NO_VALUE does not send underlying document datatype

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.5.3, 6.0.1
    • 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.5.1, 5.5.2, 6.0.0
    • couchbase-bucket
    • None
    • Untriaged
    • Yes

    Description

      As seen in discussions on CBSE-5958, in 4.x, setting DCP_ADD_STREAM_FLAG_NO_VALUE during STREAM_REQUEST would send the datatype of the document.

      In 5.0 the flags to control what is included in mutations / deletions was refactored to support XATTRs, which removed DCP_ADD_STREAM_FLAG_NO_VALUE, replacing it with DCP_OPEN flags DCP_OPEN_INCLUDE_XATTRS and DCP_OPEN_NO_VALUE. However, when the DCP_OPEN flags are used the datatype field reflects the contents of the body payload; not the original datatype.

      For example, if a document has underlying datatype:JSON but a DCP connection is opened with DCP_OPEN_NO_VALUE; then the body is not included and the datatype is set to RAW_BYTES (i.e. none).

      View engine needs DCP_OPEN_INCLUDE_XATTRS to support older Sync Gateway. Fetching document body causes overheads when documents are large to erlang components, which is the reason we created enabled this feature in the first place.

      Please fix DCP_OPEN_NO_VALUE to provide document datatype, or please provide an alternate flag that provides the 4.x behavior when XATTRs are enabled.

      Attachments

        Issue Links

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

          Activity

            People

              arunkumar Arunkumar Senthilnathan (Inactive)
              siri Sriram Melkote (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty