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

_stats built in reduce gives poor error message when emitted value is not a number

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 2.0-developer-preview-4
    • 2.0-beta
    • None
    • Security Level: Public
    • None
    • 2.0.0r-232-g0a285d9
      4 node cluster

    Description

      Returns:
      ["Unexpected server error, request logged."]

      Should return something like:

      {"error":"invalid_value","reason":"builtin _stats function requires map values to be numbers"}

      map:
      function (doc) {
      if (doc["actor"]["name"])

      { emit(doc["actor"]["name"], null); }

      }

      reduce:
      _stats

      error:
      Server error during processing: ["web request failed",

      {path, "/couchBase/default/_design/$dev_test/_view/users"}

      ,

      {type,error}

      ,

      {what,badarg}

      ,
      {trace,
      [{erlang,list_to_binary,
      [[

      {couch_query_servers,builtin_stats, [reduce, [[[<<"Filipe David Borba Manana">>, <<"1bd7139b1036b3130f1e46f92a302cf9">>], null]]]}

      ,

      {couch_query_servers,builtin_reduce,4}

      ,

      {couch_query_servers,reduce,3}

      ,

      {couch_view_group, '-init_group/4-fun-1-',4}

      ,

      {couch_btree, '-write_node/3-lc$^0/1-0-',5}

      ,

      {couch_btree,write_node,3}

      ,

      {couch_btree,modify_node,5}

      ,

      {couch_btree,query_modify,4}

      ]]},

      {couch_httpd,error_info,1}

      ,

      {couch_httpd,send_error,2}

      ,

      {couch_httpd,handle_request_int,6}

      ,

      {menelaus_web,loop,3}

      ,

      {mochiweb_http,headers,5}

      ,

      {proc_lib,init_p_do_apply,3}

      ]}]

      Attachments

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

        Activity

          People

            FilipeManana Filipe Manana (Inactive)
            keith Keith Batten (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty