Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 53846 invoked from network); 14 Feb 2011 19:09:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Feb 2011 19:09:01 -0000 Received: (qmail 34232 invoked by uid 500); 14 Feb 2011 19:09:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 34056 invoked by uid 500); 14 Feb 2011 19:08:58 -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 34042 invoked by uid 99); 14 Feb 2011 19:08:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Feb 2011 19:08:57 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=FREEMAIL_FROM,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [128.193.15.47] (HELO smtp7.oregonstate.edu) (128.193.15.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Feb 2011 19:08:48 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp7.oregonstate.edu (Postfix) with ESMTP id BE441441149 for ; Mon, 14 Feb 2011 11:08:25 -0800 (PST) X-Virus-Scanned: amavisd-new at oregonstate.edu Received: from smtp7.oregonstate.edu ([127.0.0.1]) by localhost (smtp.oregonstate.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V6Zl0m+gldBf for ; Mon, 14 Feb 2011 11:08:25 -0800 (PST) Received: from 3oh1.uhds.oregonstate.edu (3oh1.uhds.oregonstate.edu [128.193.104.33]) by smtp7.oregonstate.edu (Postfix) with ESMTP id 777C64410FD for ; Mon, 14 Feb 2011 11:08:25 -0800 (PST) Received: by 3oh1.uhds.oregonstate.edu (Postfix, from userid 2001) id 712122006B; Mon, 14 Feb 2011 11:08:25 -0800 (PST) Date: Mon, 14 Feb 2011 11:08:25 -0800 From: Gordon To: dev@couchdb.apache.org Subject: inconsistent behavior in _all_docs with deleted documents Message-ID: <20110214190825.GK2154@3oh1.uhds.oregonstate.edu> Mail-Followup-To: dev@couchdb.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Checked: Checked by ClamAV on apache.org Hello, I noticed a change in behavior from 1.0.1 to 1.1.x regarding _all_docs and deleted documents. I've got a series of cURL commands that reproduce the "issue" for me. curl -XPUT http://localhost:5984/test_20110214 curl -XPUT -d '{"_id":"foo","data":"bar"}' -H'Content-Type: application/json' http://localhost:5984/test_20110214/foo curl -XDELETE http://localhost:5984/test_20110214/foo?rev= curl -XPOST -d'{"keys":["foo"]}' -H'Content-Type: application/json' http://localhost:5984/test_20110214/_all_docs?include_docs=true and you'll obviously need to replace with the revision returned by the previous command. On 1.0.1, this results in something like the following: {"total_rows":0,"offset":0,"rows":[ {"id":"foo","key":"foo","value":{"rev":"2-21a02b631e42e652c8ef52da9b156997","deleted":true},"doc":null} ]} However, on 1.1.x, this results in something like the following: {"total_rows":0,"offset":0,"rows":[ {"id":"foo","key":"foo","value":{"rev":"2-21a02b631e42e652c8ef52da9b156997","deleted":true},"doc":{"_id":"foo","_rev":"2-21a02b631e42e652c8ef52da9b156997","_deleted":true}} ]} Note that instead of 'null', 1.1.x actually returns a stub document with _deleted set to 'true'. I'm not sure if this is change in behavior is expected or not, but I didn't want to file a bug report without checking with the list first. The second question this led me to: do we want to return any rows at all? I noticed that "total_rows" is 0 in both cases, yet there is 1 row returned. Thanks for your time and any insight you can provide.