You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Robert Newson (JIRA)" <ji...@apache.org> on 2016/09/10 17:49:20 UTC

[jira] [Commented] (COUCHDB-2744) _all_dbs returns broken response when keys query parameter is used

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

Robert Newson commented on COUCHDB-2744:
----------------------------------------

can't reproduce this.

➜  ~ curl foo:bar@localhost:15984/db1/doc1 -XPUT -d {}
{"ok":true,"id":"doc1","rev":"1-967a00dff5e02add41819138abb3284d"}
➜  ~ curl -g 'foo:bar@localhost:15984/db1/_all_docs?keys=["foo"]'
{"total_rows":2,"rows":[
{"key":"foo","error":"not_found"}
]}
➜  ~ curl -g 'foo:bar@localhost:15984/db1/_all_docs?keys=["doc1"]'
{"total_rows":2,"rows":[
{"id":"doc1","key":"doc1","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}
]}
➜  ~ curl -g 'foo:bar@localhost:15984/db1/_all_docs?keys=["doc1","doc2"]'
{"total_rows":2,"rows":[
{"id":"doc1","key":"doc1","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
{"key":"doc2","error":"not_found"}
]}

> _all_dbs returns broken response when keys query parameter is used
> ------------------------------------------------------------------
>
>                 Key: COUCHDB-2744
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2744
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 2.0.0
>            Reporter: Alexander Shorin
>             Fix For: 2.0.0
>
>
> {code}
> ~ $ curl -XPUT http://localhost:59840/db
> {"ok":true}
> ~ $ curl -XPUT http://localhost:59840/test
> {"ok":true}
> ~ $ curl -XGET 'http://localhost:59840/_all_dbs?key="test"'
> ["test"]
> ~ $ curl -XGET 'http://localhost:59840/_all_dbs?key="db"'
> ["db"]
> ~ $ curl -XGET 'http://localhost:59840/_all_dbs?startkey="db"&endkey="test/"'
> ["db","test"]
> ~ $ curl -XGET 'http://localhost:59840/_all_dbs?keys=\["db","test"\]'
> curl: (18) transfer closed with outstanding read data remaining
> ~ $ curl  -v -XGET 'http://localhost:59840/_all_dbs?keys=\["db","test"\]'
> *   Trying ::1...
> * connect to ::1 port 59840 failed: Connection refused
> *   Trying 127.0.0.1...
> * Connected to localhost (127.0.0.1) port 59840 (#0)
> > GET /_all_dbs?keys=["db","test"] HTTP/1.1
> > Host: localhost:59840
> > User-Agent: curl/7.43.0
> > Accept: */*
> > 
> < HTTP/1.1 200 OK
> < X-CouchDB-Body-Time: 0
> < X-Couch-Request-ID: e215f1e866
> < Transfer-Encoding: chunked
> < Server: CouchDB/f29e590 (Erlang OTP/18)
> < Etag: "D0LI59O6S1E5P0UV53BZZ7U9"
> < Date: Wed, 08 Jul 2015 23:36:21 GMT
> < Content-Type: text/plain; charset=utf-8
> < Cache-Control: must-revalidate
> < 
> * transfer closed with outstanding read data remaining
> * Closing connection 0
> curl: (18) transfer closed with outstanding read data remaining
> {code}
> Meanwhile in logs:
> {code}
> 2015-07-09 02:39:05.719 [notice] node1@127.0.0.1 <0.14013.3> af9a6ad1a3 127.0.0.1 localhost:59840 GET /_all_dbs?keys=["db","test"] 200 aborted 3
> 2015-07-09 02:39:05.719 [error] node1@127.0.0.1 <0.14013.3> Response abnormally terminated: {<<"db">>,database_does_not_exist}
> 2015-07-09 02:39:07.657 [error] node1@127.0.0.1 <0.15730.3> _all_docs open error: _dbs db :: {error,database_does_not_exist} [{mem3_shards,load_shards_from_db,[95,100,98,115],[{file,[115,114,99,47,109,101,109,51,95,115,104,97,114,100,115,46,101,114,108]},{line,282}]},{mem3_shards,load_shards_from_disk,1,[{file,[115,114,99,47,109,101,109,51,95,115,104,97,114,100,115,46,101,114,108]},{line,270}]},{mem3_shards,load_shards_from_disk,2,[{file,[115,114,99,47,109,101,109,51,95,115,104,97,114,100,115,46,101,114,108]},{line,286}]},{mem3_shards,for_docid,3,[{file,[115,114,99,47,109,101,109,51,95,115,104,97,114,100,115,46,101,114,108]},{line,85}]},{fabric_doc_open,go,3,[{file,[115,114,99,47,102,97,98,114,105,99,95,100,111,99,95,111,112,101,110,46,101,114,108]},{line,38}]},{fabric_view_all_docs,open_doc_int,4,[{file,[115,114,99,47,102,97,98,114,105,99,95,118,105,101,119,95,97,108,108,95,100,111,99,115,46,101,114,108]},{line,228}]},{fabric_view_all_docs,open_doc,4,[{file,[115,114,99,47,102,97,98,114,105,99,95,118,105,101,119,95,97,108,108,95,100,111,99,115,46,101,114,108]},{line,217}]}]
> 2015-07-09 02:39:07.657 [notice] node1@127.0.0.1 <0.15714.3> b19fb3debf 127.0.0.1 localhost:59840 GET /_all_dbs?keys=["db","test"] 200 aborted 2
> 2015-07-09 02:39:07.657 [error] node1@127.0.0.1 <0.15714.3> Response abnormally terminated: {<<"db">>,database_does_not_exist}
> {code}



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