You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "James Henstridge (JIRA)" <ji...@apache.org> on 2011/02/28 15:39:37 UTC

[jira] Created: (COUCHDB-1077) bulkSave() method in couch.js generates more UUIDs than are needed.

bulkSave() method in couch.js generates more UUIDs than are needed.
-------------------------------------------------------------------

                 Key: COUCHDB-1077
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1077
             Project: CouchDB
          Issue Type: Bug
          Components: Futon
    Affects Versions: 1.0.1
         Environment: Ubuntu 10.10
            Reporter: James Henstridge
            Priority: Minor


The code in bulkSave() to fill in the "_id" attribute of documents that are missing it generates more UUIDs than needed.

It first counts the number of documents that lack the _id attribute, but instead of using this value when calling CouchDB.newUuids(), it instead uses the total number of documents.

This doesn't result in incorrect results, but is wasted effort.  If all the documents already have IDs, then it also adds an unnecessary round trip.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (COUCHDB-1077) bulkSave() method in couch.js generates more UUIDs than are needed.

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt resolved COUCHDB-1077.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2

Fixed in trunk.

> bulkSave() method in couch.js generates more UUIDs than are needed.
> -------------------------------------------------------------------
>
>                 Key: COUCHDB-1077
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1077
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Futon
>    Affects Versions: 1.0.1
>         Environment: Ubuntu 10.10
>            Reporter: James Henstridge
>            Priority: Minor
>             Fix For: 1.2
>
>
> The code in bulkSave() to fill in the "_id" attribute of documents that are missing it generates more UUIDs than needed.
> It first counts the number of documents that lack the _id attribute, but instead of using this value when calling CouchDB.newUuids(), it instead uses the total number of documents.
> This doesn't result in incorrect results, but is wasted effort.  If all the documents already have IDs, then it also adds an unnecessary round trip.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira