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

'Reduce too large' error is not returned in query response for production views

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.5.0
    • view-engine
    • Security Level: Public
    • None

    Description

      development view with too large reduce function, works fine with development subset
      But once I add full_set param or publish view it just returns empty results. I see error in the logs but not in my request:

      curl -X GET -v 'http://10.3.121.110:8092/default/_design/dev_new_r'
      curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

      • About to connect() to 10.3.121.110 port 8092 (#0)
      • Trying 10.3.121.110... connected
      • Connected to 10.3.121.110 (10.3.121.110) port 8092 (#0)
        > GET /default/_design/dev_new_r HTTP/1.1
        > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.21.4 OpenSSL/1.0.1 zlib/1.2.3.4
        > Host: 10.3.121.110:8092
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < X-Couchbase-Meta: {"id":"_design/dev_new_r","rev":"2-93f28d98","type":"json"}

        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Date: Fri, 20 Dec 2013 12:39:18 GMT
        < Content-Type: application/json
        < Content-Length: 241
        < Cache-Control: must-revalidate
        <

      • Connection #0 to host 10.3.121.110 left intact
      • Closing connection #0
        {"views":{"new_r":{"map":"function (doc, meta) {\n emit(meta.id, null);\n}

        ","reduce":"function(key, values, rereduce)

        Unknown macro: { var val_test = 'test'; while (val_test.length < 70000) { val_test = val_test.concat(val_test); } return val_test;}

        "}}}iryna@ubuntu:~/couchbase/testrunner$

      iryna@ubuntu:~/couchbase/testrunner$ curl -v 'http://10.3.121.110:8092/default/design/dev_new_r/_view/new_r?stale=false&connection_timeout=60000&limit=10&skip=0'
      curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

      • About to connect() to 10.3.121.110 port 8092 (#0)
      • Trying 10.3.121.110... connected
      • Connected to 10.3.121.110 (10.3.121.110) port 8092 (#0)
        > GET /default/_design/dev_new_r/_view/new_r?stale=false&connection_timeout=60000&limit=10&skip=0 HTTP/1.1
        > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.21.4 OpenSSL/1.0.1 zlib/1.2.3.4
        > Host: 10.3.121.110:8092
        > Accept: /
        >
        < HTTP/1.1 500 Internal Server Error
        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Date: Fri, 20 Dec 2013 12:40:50 GMT
        < Content-Type: text/plain;charset=utf-8
        < Content-Length: 64
        < Cache-Control: must-revalidate
        < {"error":"error","reason":"Reduction too large (131074 bytes)"}
      • Connection #0 to host 10.3.121.110 left intact
      • Closing connection #0
        iryna@ubuntu:~/couchbase/testrunner$

      and now with full set:
      iryna@ubuntu:~/couchbase/testrunner$ curl -v 'http://10.3.121.110:8092/default/_design/dev_new_r/_view/new_r?full_set=true&connection_timeout=60000&limit=10&skip=0'
      curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

      • About to connect() to 10.3.121.110 port 8092 (#0)
      • Trying 10.3.121.110... connected
      • Connected to 10.3.121.110 (10.3.121.110) port 8092 (#0)
        > GET /default/_design/dev_new_r/_view/new_r?full_set=true&connection_timeout=60000&limit=10&skip=0 HTTP/1.1
        > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.21.4 OpenSSL/1.0.1 zlib/1.2.3.4
        > Host: 10.3.121.110:8092
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Transfer-Encoding: chunked
        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Date: Fri, 20 Dec 2013 12:42:13 GMT
        < Content-Type: text/plain;charset=utf-8
        < Cache-Control: must-revalidate
        < {"rows":[ ] }
      • Connection #0 to host 10.3.121.110 left intact
      • Closing connection #0
        iryna@ubuntu:~/couchbase/testrunner$

      iryna@ubuntu:~/couchbase/testrunner$ curl -v 'http://10.3.121.110:8092/default/_design/new_r/_view/new_r?connection_timeout=60000&limit=10&skip=0'
      curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

      • About to connect() to 10.3.121.110 port 8092 (#0)
      • Trying 10.3.121.110... connected
      • Connected to 10.3.121.110 (10.3.121.110) port 8092 (#0)
        > GET /default/_design/new_r/_view/new_r?connection_timeout=60000&limit=10&skip=0 HTTP/1.1
        > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.21.4 OpenSSL/1.0.1 zlib/1.2.3.4
        > Host: 10.3.121.110:8092
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Transfer-Encoding: chunked
        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Date: Fri, 20 Dec 2013 12:44:43 GMT
        < Content-Type: text/plain;charset=utf-8
        < Cache-Control: must-revalidate
        < {"rows":[ ] }
      • Connection #0 to host 10.3.121.110 left intact
      • Closing connection #0
        iryna@ubuntu:~/couchbase/testrunner$

      Attachments

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

        Activity

          People

            iryna iryna
            iryna iryna
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty