You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Will Holley (JIRA)" <ji...@apache.org> on 2015/08/04 19:03:04 UTC

[jira] [Commented] (COUCHDB-2767) CouchDB 2.X: _changes?feed=longpoll returns an invalid response

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

Will Holley commented on COUCHDB-2767:
--------------------------------------

The fix prevents an error but doesn't match CouchDB 1.X behaviour.

In Couch 1.X, we return

{code}
{"results":[

.... 60 second pause

],
"last_seq":0}
{code}

In CouchDB master we get

{code}
.... 60 second pause

{"results":[

],
"last_seq":[0,"g1AAAAGzeJyF0FEKwjAMANCigv55BD2BNFux_XM30SVtGWPOI-hN9CZ6E71JzejH1o8yAklIeB9JJ4TYNEsrtv3NOqig0AfJAR0vFrXAXQihbbi78mBtHZEBnQW454ynxJTgPZoyb6rBnBODxsmSKG8ug7knxmksUELW9CvO4sGF2XN0yhoi6WfcK7r35K5aolT5u6L7RPcdnTaoQR9n3C-66e8toVK2_QMO8m2V"],"pending":0}
{code}


> CouchDB 2.X: _changes?feed=longpoll returns an invalid response
> ---------------------------------------------------------------
>
>                 Key: COUCHDB-2767
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2767
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: HTTP Interface
>            Reporter: Will Holley
>            Assignee: Robert Newson
>            Priority: Blocker
>             Fix For: 2.0.0
>
>
> _changes?feed=longpoll seems to be broken in CouchDB master.
> In CouchDB 1.6.1:
> {code}
> $ curl http://127.0.0.1:5984/testlongpoll -XPUT
> {"ok":true}
> $ curl 'http://127.0.0.1:5984/testlongpoll/_changes?feed=longpoll' 
>  {"results":[
> ],
> "last_seq":0}
> {code}
> For the last request, the connection is held open (as expected) before the final part of the response is returned.
> In CouchDB 2.X/master:
> {code}
> $ curl 'http://127.0.0.1:15984/testlongpoll' -XPUT 
> {"ok":true}
> $curl 'http://127.0.0.1:15984/testlongpoll/_changes?feed=longpoll'
> {"results":[
> {code}
> CouchDB 2.X closes the connection immediately, resulting in invalid JSON.
> The PouchDB test suite detected this around 13 days ago, coinciding with https://github.com/apache/couchdb-chttpd/commit/3866725ee99c6d89aff91ecb70a3b3cbbabaed8c, so I'd guess this is the first place to investigate.



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