Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8514CC18F for ; Sat, 7 Jul 2012 13:38:42 +0000 (UTC) Received: (qmail 5693 invoked by uid 500); 7 Jul 2012 13:38:41 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 5039 invoked by uid 500); 7 Jul 2012 13:38:37 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 4983 invoked by uid 99); 7 Jul 2012 13:38:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jul 2012 13:38:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 7D8DB142822 for ; Sat, 7 Jul 2012 13:38:34 +0000 (UTC) Date: Sat, 7 Jul 2012 13:38:33 +0000 (UTC) From: "Robert Newson (JIRA)" To: dev@couchdb.apache.org Message-ID: <1967830393.18778.1341668314518.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (COUCHDB-1510) new_edits=false on new document causes function_clause error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Robert Newson created COUCHDB-1510: -------------------------------------- Summary: new_edits=false on new document causes function_clause error Key: COUCHDB-1510 URL: https://issues.apache.org/jira/browse/COUCHDB-1510 Project: CouchDB Issue Type: Bug Affects Versions: 1.2 Reporter: Robert Newson Assignee: Robert Newson Fix For: 1.2.1, 1.3 The code for handling new_edits=false assumes a previous revision; couch_db_updater.erl; fun({Client, {#doc{revs={Pos,[_Rev|PrevRevs]}}=NewDoc, Ref}}, AccTree) -> but in the case of a new document, there isn't one. The user then receives an error, the updater process dies with a function clause. The problem here is that a user (elliotcm) is doing new_edits=false for all requests, and the intensity of the gen_server crashes under load is sufficient to propogate upward to the top supervisor, crashing couchdb. So, is the correct behavior to return a 400 or a 201? #!/bin/sh URL=http://localhost:5984/mergetest curl -XDELETE $URL curl -XPUT $URL curl -XPUT -d '{}' $URL/doc?new_edits=false -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira