You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Sam Bisbee (Closed) (JIRA)" <ji...@apache.org> on 2012/02/21 23:22:53 UTC

[jira] [Closed] (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 ]

Sam Bisbee closed COUCHDB-16.
-----------------------------


Resolved for a while now. Closing.
                
> _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.
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