You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Christopher Lenz (JIRA)" <ji...@apache.org> on 2008/06/04 17:47:45 UTC

[jira] Resolved: (COUCHDB-16) _bulk_docs returns results in reverse order

     [ https://issues.apache.org/jira/browse/COUCHDB-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Lenz resolved COUCHDB-16.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.8

This works as expected in trunk (I think it already worked in 0.7.2, but I may be wrong), and I just added a test case in r663239.

> _bulk_docs returns results in reverse order
> -------------------------------------------
>
>                 Key: COUCHDB-16
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-16
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>            Reporter: Noah Slater
>            Priority: Minor
>             Fix For: 0.8
>
>         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.