Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.5.2
-
Untriaged
-
Unknown
Description
Bug Details:
The bug causes view query to return HTTP error code 500 suggesting Internal sever error. This occurs when querying on a ddoc that is deleted. This mostly occurs when view queries are running in a loop and while the queries are running, the ddoc is deleted, not just the view indexes.
The HTTP handler of CouchDB gets
{error, deleted} pattern when the ddoc is deleted, but this was not being handled, resulting in not matching of any case, causing the view engine to crash.# To reproduce the issue, build the view index, then delete the ddoc itself, and then query on a view in that deleted ddoc.
# Another way is to run view queries in a loop and while queries are running, delete the entire ddoc. The view queries will crash returning HTTP error code 500.
Fix:
The case clause in handle_design_req/2 of couch_httpd_db is changed to handle one more case {error, deleted}
This mitigates the issue and the queries return error message suggesting the ddoc has been deleted rather than crashing.
Attachments
Issue Links
- is a backport of
-
MB-34399 Handling {error, deleted} in couch_httpd_db:handle_design_req/2
- Closed
For Gerrit Dashboard: MB-34428 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
112700,2 | MB-34428: Handling ddoc deleted in couch_httpd_db | alice | couchdb | Status: MERGED | +2 | +1 |