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

[BP MB-38169] - Views do not handle compressed raw documents

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      Steps to Reproduce

      1. Create a cluster with a single data node.
      2. Create a bucket (mine named test), set compression to 'Active'.
      3. Add a binary document to the bucket:

        /opt/couchbase/bin/cbc create -U "couchbase://localhost/test" -u Administrator -P password testing1234 -V $(printf '=%.0s' {1..100000})
        

      4. Create a view with the default definition (emit(meta.id, null)).
      5. Run the view across the full dataset.

      Expected Result
      The results of the view to come back, not sure if the doc should be included or not, but it should succeed.

      Actual Result
      The view query fails with the following error:

      reason: case_clause (2) 
      

      Analysis
      This is the same as MB-32858, but there's a different datatype not being handled.
      Views need to handle DCP_DATA_TYPE_RAW_COMPRESSED (http://src.couchbase.org/source/xref/6.0.3/couchdb/src/couch_dcp/include/couch_dcp.hrl#56) in do_maps() (http://src.couchbase.org/source/xref/6.0.3/couchdb/src/couch_set_view/src/couch_set_view_updater.erl#844-865).

      Workaround
      The workaround for this issue is the same as MB-32858, add the following to the view definition:

      var x = doc;
      

      Attachments

        Issue Links

          Activity

            People

              ankit.prabhu Ankit Prabhu
              jeelan.poola Jeelan Poola
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty