You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Nick Vatamaniuc (JIRA)" <ji...@apache.org> on 2015/10/09 16:30:26 UTC

[jira] [Commented] (COUCHDB-2847) list function + no rows return 500

    [ https://issues.apache.org/jira/browse/COUCHDB-2847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950470#comment-14950470 ] 

Nick Vatamaniuc commented on COUCHDB-2847:
------------------------------------------

Reproduced on 2.0 master.

{code}
DB1="http://127.0.0.1:15984" && http -pb DELETE $DB1/db ; http -pb PUT $DB1/db && http -pb PUT $DB1/db/_design/ddoc < lists.json && http GET $DB1/db/_design/ddoc/_list/simple_row_render/list_animal_ids
{code}

Here is what I see in the logs on node1:

{code}
2015-10-09 10:26:41.251 [notice] node1@127.0.0.1 <0.28955.0> 1a1085f2ef 127.0.0.1 127.0.0.1:15984 PUT /db/_design/ddoc 201 ok 152
2015-10-09 10:26:41.431 [warning] node1@127.0.0.1 <0.29355.0> write quorum (2) failed for updated:db
2015-10-09 10:27:04.069 [warning] node1@127.0.0.1 <0.29784.0> no record of user testuser
2015-10-09 10:27:04.071 [error] node1@127.0.0.1 <0.24269.0> OS Process #Port<0.29735> Input  :: ["reset",{"reduce_limit":true,"timeout":5000}]
2015-10-09 10:27:04.072 [error] node1@127.0.0.1 <0.24269.0> OS Process #Port<0.29735> Output :: true
2015-10-09 10:27:04.077 [info] node1@127.0.0.1 <0.29843.0> Opening index for db: shards/00000000-1fffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.077 [info] node1@127.0.0.1 <0.29842.0> Opening index for db: shards/20000000-3fffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.077 [info] node1@127.0.0.1 <0.29852.0> Opening index for db: shards/40000000-5fffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.077 [info] node1@127.0.0.1 <0.29874.0> Starting index update for db: shards/00000000-1fffffff/db.1444400800 idx: _design/ddoc
2015-10-09 10:27:04.078 [info] node1@127.0.0.1 <0.29853.0> Opening index for db: shards/60000000-7fffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.078 [error] node1@127.0.0.1 <0.19402.0> OS Process #Port<0.29326> Input  :: ["reset",{"reduce_limit":true,"timeout":5000}]
2015-10-09 10:27:04.078 [info] node1@127.0.0.1 <0.29856.0> Opening index for db: shards/c0000000-dfffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.079 [error] node1@127.0.0.1 <0.19402.0> OS Process #Port<0.29326> Output :: true
2015-10-09 10:27:04.080 [error] node1@127.0.0.1 <0.19402.0> OS Process #Port<0.29326> Input  :: ["add_fun","function(doc) {if(doc._id){emit(doc._id, null);}}"]
2015-10-09 10:27:04.080 [info] node1@127.0.0.1 <0.29854.0> Opening index for db: shards/80000000-9fffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.080 [info] node1@127.0.0.1 <0.29855.0> Opening index for db: shards/a0000000-bfffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.080 [info] node1@127.0.0.1 <0.29857.0> Opening index for db: shards/e0000000-ffffffff/db.1444400800 idx: _design/ddoc sig: "33f5c1468000e6705b213817d6e2c65a"
2015-10-09 10:27:04.080 [error] node1@127.0.0.1 <0.19402.0> OS Process #Port<0.29326> Output :: true
2015-10-09 10:27:04.080 [info] node1@127.0.0.1 <0.29874.0> Index update finished for db: shards/00000000-1fffffff/db.1444400800 idx: _design/ddoc
2015-10-09 10:27:04.083 [error] node1@127.0.0.1 <0.24269.0> OS Process #Port<0.29735> Input  :: ["ddoc","_design/ddoc",["lists","simple_row_render"],[{"total_rows":0,"offset":0},{"info":{
"db_name":"db","update_seq":"1-g1AAAAFDeJzLYWBg4MhgTmHgz8tPSTV2MDQy1zMAQsMcoARTIkOS_P___7MSGXEqSVIAkkn2YFUMuFU5gFTFE1KVAFJVj6bKCE1VHguQZGgAUkCF8wmrXABRuR-fzRCVByAq7yOrNMSq8gFEJcidWQApDVaD
","sizes":{"file":54458,"external":289,"active":1517},"purge_seq":0,"other":{"data_size":289},"doc_del_count":0,"doc_count":1,"disk_size":54458,"disk_format_version":6,"data_size":1517,"c
ompact_running":false,"instance_start_time":"0"},"uuid":"e49291eceba0ab7df94e72fd0b001eb2","id":null,"method":"GET","requested_path":"undefined","path":["db","_design","ddoc","_list","sim
ple_row_render","list_animal_ids"],"raw_path":"/db/_design/ddoc/_list/simple_row_render/list_animal_ids","query":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate","Authorizat
ion":"Basic dGVzdHVzZXI6dGVzdHBhc3M=","Connection":"keep-alive","Host":"127.0.0.1:15984","User-Agent":"HTTPie/0.9.2"},"body":"undefined","peer":"127.0.0.1","form":{},"cookie":{},"userCtx"
:{"db":"db","name":"testuser","roles":["_admin"]},"secObj":{}}]]
2015-10-09 10:27:04.084 [error] node1@127.0.0.1 <0.24269.0> OS Process #Port<0.29735> Output :: ["start",[],{"headers":{}}]
2015-10-09 10:27:04.084 [error] node1@127.0.0.1 <0.24269.0> OS Process #Port<0.29735> Input  :: ["list_end"]
2015-10-09 10:27:04.084 [error] node1@127.0.0.1 <0.24269.0> OS Process #Port<0.29735> Output :: ["end",[]]
2015-10-09 10:27:04.087 [error] node1@127.0.0.1 <0.29784.0> req_err(2026616732) unknown_error : undef
    [<<"undefined:write_chunk/1">>,<<"chttpd:send_chunk/2 L656">>,<<"couch_mrview_show:list_cb/2 L244">>,<<"fabric_view:maybe_send_row/1 L140">>,<<"rexi_utils:process_mailbox/6 L55">>,<<"
fabric_view_map:go/5 L73">>,<<"fabric_view_map:go/6 L39">>,<<"couch_query_servers:with_ddoc_proc/2 L321">>]
2015-10-09 10:27:04.087 [error] node1@127.0.0.1 <0.29784.0> httpd 500 error response:
 {"error":"unknown_error","reason":"undef","ref":2026616732}
{code}

> list function + no rows return 500
> ----------------------------------
>
>                 Key: COUCHDB-2847
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2847
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>            Reporter: James Mark Mackenzie
>
> A list function applied to a view with no rows returned results in a 500 response from the server. 
> Steps to reproduce: 
> 1) PUT /db
> 2) PUT /db/_design/ddoc
> 3) GET /db/ddoc/_list/simple_row_render/list_animal_ids
> The system reponeds with: 
> {u'reason': u'undef', u'ref': 902602498, u'error': u'unknown_error'}
> Ddoc: 
> {noformat}
> {"_id": "_design/ddoc",
>                "views": {"list_animal_ids": {"map": "function(doc) {if(doc._id){emit(doc._id, null);}}"}},
>                "lists": {"simple_row_render": "function(head, req) {var row; while(row=getRow()) {send(JSON.stringify(row)); }}"}}
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)