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

[jira] [Created] (COUCHDB-3132) Invalid chunk when database is deleted while a continuous change request is running

Samuel Tardieu created COUCHDB-3132:
---------------------------------------

             Summary: Invalid chunk when database is deleted while a continuous change request is running
                 Key: COUCHDB-3132
                 URL: https://issues.apache.org/jira/browse/COUCHDB-3132
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
            Reporter: Samuel Tardieu


If the database is deleted while a continuous change request is running, a new bunch of HTTP headers and a JSON payload explaining the error are emitted instead of just a JSON payload using the proper chunked response format.

This is a regression as this situation closed the stream properly in CouchDB 1.x.

Example response (wire format dump from wireshark) sent by CouchDB 2.0.0-RC4 if the database is deleted while the _changes request is running:

{noformat}
OST /canape-test-db-45b83172-8355-45a9-867d-e6b8d6c205a6/_changes?heartbeat=30000&feed=continuous HTTP/1.1
User-Agent: canape for Scala
Accept: application/json
Host: localhost:5984
Content-Type: application/json
Content-Length: 0

HTTP/1.1 200 OK
Cache-Control: must-revalidate
Content-Type: application/json
Date: Tue, 06 Sep 2016 12:37:32 GMT
Server: CouchDB/1df597f (Erlang OTP/17)
Transfer-Encoding: chunked
X-Couch-Request-ID: 7992b39f23
X-CouchDB-Body-Time: 0

1


15c
{"seq":"1-g1AAAAIHeJyN0MENgjAUgOGnmKgHZ9ARWqgUTrKJvrYQJFgO6lk30U10E90EizUBTEh6eU2a_l-TVwLALPcULHSlK5Umusqr46k012MEsazrusg9HB3MxTRASX2C_48HcrEyU2x-AnyFMEaSEapgftYqzfY6VUN10tTbXi1oEPlSudS7pr70aolRwEjsUOuJmXA1hwFunf8jGoYMnYW7FR6twDHz_TBwFp5WeLXCmgsuI5cdWOFthc4eUHLGY9YVig9FlJt6","id":"docid1","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}

1


160
{"seq":"2-g1AAAAILeJyNkEsOgjAQhquYqAvPoEfoyxZWchPtA4IE24W61pvoTfQmehMs1gQwIenmn2Qy35eZqQAAsyLSYGGssTpLjS3s8VS59lgAuazruiwiMTq4xpQIhTAU_8MDuFy5lJufAXwNLBEwh0iD-dnoLN-bTA_RaUNve7REJMZKh9C7hr70aCViQmESQJuJS3B1xQlu7f0yRozR0Pu95e4tj3YPLnKMGQne4-kNr9aw5pKrOOQP3vD2hs4vhOKUJ7RrKD8Y3J0r","id":"docid2","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}

1


160
{"seq":"3-g1AAAAIPeJyNkUsOgjAQQKuYqAvPoEfoT1pWchPtB4IE24W61pvoTfQmehMs1gQhIelmJpnMe5lPBQCYFZEGC2ON1VlqbGGPp8qVxwLIZV3XZRGJ0cEVpkQohKHoNw_gcuWi3PwM4GuIEwFziDSYn43O8r3J9BCdNvS2Q0tEOFY6hN419KVDK8EJhUkAbSYugqtLTnBr95ccxTEN3d9b7t7yaOdgIsc4JsFzPL3h1RrWTDLFQ-7gDW9v-PukUIyyhPaZ8gORx57c","id":"docid3","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}

HTTP/1.1 500 Internal Server Error
Cache-Control: must-revalidate
Content-Length: 48
Content-Type: application/json
Date: Tue, 06 Sep 2016 12:37:32 GMT
Server: CouchDB/1df597f (Erlang OTP/17)
X-Couch-Request-ID: 7992b39f23
X-CouchDB-Body-Time: 0

{"error":"changes_feed_died","reason":"normal"}
{noformat}



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