You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Alexander Shorin (JIRA)" <ji...@apache.org> on 2015/02/23 01:53:11 UTC

[jira] [Commented] (COUCHDB-2614) Selectors with {$eq: 'foo', $gte: 'foo'} cause 500 error

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

Alexander Shorin commented on COUCHDB-2614:
-------------------------------------------

On CouchDB 2.0 (current master for this comment timestamp) it causes the following error in logs:
{code}
2015-02-23 03:50:40.454 [error] node1@127.0.0.1 <0.370.0> req_err(4156138022) unknown_error : function_clause
    [<<"mango_idx_view:start_key/1 L118">>,<<"mango_cursor_view:execute/3 L71">>,<<"mango_httpd:handle_find_req/2 L137">>,<<"mango_httpd:handle_req/2 L28">>,<<"chttpd:handle_request/1 L210">>,<<"mochiweb_http:headers/5 L93">>,<<"proc_lib:init_p_do_apply/3 L237">>]
2015-02-23 03:50:40.454 [error] node1@127.0.0.1 <0.370.0> httpd 500 error response:
 {"error":"unknown_error","reason":"function_clause","ref":4156138022}

2015-02-23 03:50:40.455 [notice] node1@127.0.0.1 <0.370.0> ffc69f31 127.0.0.1 localhost:16984 POST /test/_find 500 ok 45

{code}

> Selectors with {$eq: 'foo', $gte: 'foo'} cause 500 error
> --------------------------------------------------------
>
>                 Key: COUCHDB-2614
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2614
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Mango
>            Reporter: Nolan Lawson
>
> Steps to repro in curl:
> {code}
> MYDB=http://whatever.cloudant.com/somedb
> curl "$MYDB/_bulk_docs" -H 'Content-Type: application/json' --data-binary '{"new_edits":true,"docs":[{"name":"mario","_id":"mario","rank":5,"series":"mario","debut":1981},{"name":"jigglypuff","_id":"puff","rank":8,"series":"pokemon","debut":1996},{"name":"link","rank":10,"_id":"link","series":"zelda","debut":1986},{"name":"donkey kong","rank":7,"_id":"dk","series":"mario","debut":1981},{"name":"pikachu","series":"pokemon","_id":"pikachu","rank":1,"debut":1996},{"name":"captain falcon","_id":"falcon","rank":4,"series":"f-zero","debut":1990},{"name":"luigi","rank":11,"_id":"luigi","series":"mario","debut":1983},{"name":"fox","_id":"fox","rank":3,"series":"star fox","debut":1993},{"name":"ness","rank":9,"_id":"ness","series":"earthbound","debut":1994},{"name":"samus","rank":12,"_id":"samus","series":"metroid","debut":1986},{"name":"yoshi","_id":"yoshi","rank":6,"series":"mario","debut":1990},{"name":"kirby","_id":"kirby","series":"kirby","rank":2,"debut":1992}]}'
> curl "$MYDB/_index" -H 'Content-Type: application/json' --data-binary '{"index":{"fields":["series"]}}'
> curl "$MYDB/_find" -H 'Content-Type: application/json' --data-binary '{"selector":{"$and":[{"series":{"$gte":"mario"}},{"series":{"$eq":"f-zero"}},{"series":{"$eq":"mario"}}]},"fields":["_id"]}'
> {code}
> The error I get back is:
> {code:javascript}
> {"error":"function_clause","reason":null,"ref":2609331215}
> {code}



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