Details
-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.5.1, 5.5.2, 6.0.0
-
None
-
Untriaged
-
Yes
Description
(Port of MB-31967 to 6.0.x)
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
- duplicates
-
MB-31967 DCP_OPEN_NO_VALUE does not send underlying document datatype
- Closed