Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 66997 invoked from network); 11 Jul 2008 17:31:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jul 2008 17:31:29 -0000 Received: (qmail 93084 invoked by uid 500); 11 Jul 2008 17:31:29 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 93056 invoked by uid 500); 11 Jul 2008 17:31:29 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 93045 invoked by uid 99); 11 Jul 2008 17:31:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jul 2008 10:31:29 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.200.171] (HELO wf-out-1314.google.com) (209.85.200.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jul 2008 17:30:36 +0000 Received: by wf-out-1314.google.com with SMTP id 27so4524885wfd.21 for ; Fri, 11 Jul 2008 10:30:59 -0700 (PDT) Received: by 10.143.37.20 with SMTP id p20mr3258926wfj.236.1215797459143; Fri, 11 Jul 2008 10:30:59 -0700 (PDT) Received: from ?10.0.1.199? ( [98.208.62.192]) by mx.google.com with ESMTPS id 28sm1345733wfd.4.2008.07.11.10.30.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 11 Jul 2008 10:30:57 -0700 (PDT) Message-Id: To: couchdb-user@incubator.apache.org In-Reply-To: <20080711160105.GX15907@bytesexual.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: deleting a deleted document Date: Fri, 11 Jul 2008 10:30:55 -0700 References: <20080710033453.GA4875@ginosko.ndrix.org> <20080710233513.GI5886@ginosko.ndrix.org> <20080711152041.GA2423@ginosko.ndrix.org> <20080711160105.GX15907@bytesexual.org> X-Mailer: Apple Mail (2.919.2) From: Troy Kruthoff X-Virus-Checked: Checked by ClamAV on apache.org On Jul 11, 2008, at 9:01 AM, Noah Slater wrote: > On Fri, Jul 11, 2008 at 09:20:41AM -0600, Michael Hendricks wrote: >> Most database interface modules that I've worked with generate >> exceptions in >> such cases (even if the underlying database doesn't) as a way to >> help the >> programmer find his mistakes. > > That is certainly not my experience. Nor mine, it really is a concurrency issue, and concurrent deletes should be acceptable > > >> My other concern is that the CouchDB REST API doesn't accept double >> deletions. It generates an error. If CouchDB is going to give an >> error >> in one place, I think it should be consistent and do it elsewhere >> too. > > Consistency is good. Agreed, but remember the REST API is just an HTTP interface to couchdb, and the norm with HTTP is to return an error if a url is not found. Thus, when using the DELETE verb to a document url there should be an error, if the url points to a missing resource. However, when using the bulk_docs uri, you are using the verb POST to send a payload of multiple transactions, which inherently falls outside of my understanding of REST, which is all about a single URI pointing to a single resource and using the HTTP verbs. So we should think of consistency in the sense of how do we make the bulk_docs API look and smell like taking several calls to the regular REST API and implementing them as a single transaction. In a previous post, I mentioned that I would eventually like to see bulk_docs being able to process get, post, put, and delete verbs in a single payload. With that in mind, I also think bulk_docs should not be aggressive with HTTP error codes, and should instead include an HTTP status code with each row of the response. It would then be up to the app to parse the response and handle the status codes, and would give couchdb a true multi/bulk-resource wrapper around the REST API. > > >> I can see some value in making this a configurable behavior if others >> don't want an error under this circumstance. Of course, I probably >> won't send a patch for that since it's not my itch ;-) > > -1 Your absolutely right. > > > Configuration parameter proliferation is a Bad Thing. > > -- > Noah Slater, http://people.apache.org/~nslater/