Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 38914 invoked from network); 8 Mar 2008 23:59:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2008 23:59:07 -0000 Received: (qmail 92788 invoked by uid 500); 8 Mar 2008 23:59:04 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 92757 invoked by uid 500); 8 Mar 2008 23:59:04 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 92585 invoked by uid 99); 8 Mar 2008 23:59:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Mar 2008 15:59:03 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Mar 2008 23:58:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 20730234C08A for ; Sat, 8 Mar 2008 15:57:46 -0800 (PST) Message-ID: <2126145466.1205020666118.JavaMail.jira@brutus> Date: Sat, 8 Mar 2008 15:57:46 -0800 (PST) From: "Noah Slater (JIRA)" To: couchdb-dev@incubator.apache.org Subject: [jira] Updated: (COUCHDB-16) _bulk_docs returns results in reverse order In-Reply-To: <90018143.1205020546268.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Noah Slater updated COUCHDB-16: ------------------------------- Attachment: bulk_reverse_fix.diff > _bulk_docs returns results in reverse order > ------------------------------------------- > > Key: COUCHDB-16 > URL: https://issues.apache.org/jira/browse/COUCHDB-16 > Project: CouchDB > Issue Type: Bug > Reporter: Noah Slater > Priority: Minor > Attachments: bulk_reverse_fix.diff, reverse_bulk_results_test.diff > > > Posting to /database/_bulk_docs will return a JSON object which looks like > this: > { > "ok": true, > "results": [ > {"ok":true,"id":"a","rev":"3465402201"}, > {"ok":true,"id":"b","rev":"914573466"}, > {"ok":true,"id":"c","rev":"2541681057"} > ] > } > however, the "results" part of these response orders the docResults > opposite of the array posted to _bulk_docs. > I've attached a unit test which demonstrates this. > -- ry@tinyclouds.org > -- > Comment 2 by coldredlemur, Dec 25, 2007 > Actually, replacing the foldl with a foldr in mod_couch:handle_bulk_doc_update fixes the problem. (I don't > know what's going on in that function, so someone should verify that this is the accurate fix.) > -- ry -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.