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

[jira] Created: (COUCHDB-1071) Interger UUIDS (1, 2, 3, ...)

Interger UUIDS (1, 2, 3, ...)
-----------------------------

                 Key: COUCHDB-1071
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1071
             Project: CouchDB
          Issue Type: Improvement
          Components: Database Core
    Affects Versions: 1.0.2
         Environment: All
            Reporter: adisk


Please, create integer uuids.

What need:
- intger keys
- autogenerated by CouchDB
- sequential

Like a 1, 2, 3, 4, 5,...


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

        

[jira] Commented: (COUCHDB-1071) Integer UUIDS (1, 2, 3, ...)

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997891#comment-12997891 ] 

Paul Joseph Davis commented on COUCHDB-1071:
--------------------------------------------

I would also point out two other things. While there is a "sequential" uuid algorithm in CouchDB, it is still random and shouldn't significantly increase the chances of a collision for small numbers of nodes in the replication network. Sequential integer ids wouldn't maintain this property especially in a cluster environment.

Also, if you mean to have doc id's that are integers (as opposed to strings that represent integers) that'll not happen. Pretty much every part of CouchDB requires _id's to be integers and switching them out would be fairly complex and not overly general because of places that id's are expected to be (ie, URL's).

> Integer UUIDS (1, 2, 3, ...)
> ----------------------------
>
>                 Key: COUCHDB-1071
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1071
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: adisk
>              Labels: algorithm, uuid
>
> Please, create integer uuids.
> What need:
> - intger keys
> - autogenerated by CouchDB
> - sequential
> Like a 1, 2, 3, 4, 5,...

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

        

[jira] Commented: (COUCHDB-1071) Integer UUIDS (1, 2, 3, ...)

Posted by "Sebastian Cohnen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997679#comment-12997679 ] 

Sebastian Cohnen commented on COUCHDB-1071:
-------------------------------------------

The whole point of an universally unique identifier (UUID) is, that it is universally unique, even across servers. Sequential IDs will break, if you have more than one server. If you have concurrent writers, this will also cause problems...

If you need sequential IDs, you can just create them by yourself but I highly doubt that this kind of sequential integer IDs make sense for CouchDB.

> Integer UUIDS (1, 2, 3, ...)
> ----------------------------
>
>                 Key: COUCHDB-1071
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1071
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: adisk
>              Labels: algorithm, uuid
>
> Please, create integer uuids.
> What need:
> - intger keys
> - autogenerated by CouchDB
> - sequential
> Like a 1, 2, 3, 4, 5,...

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

        

[jira] Commented: (COUCHDB-1071) Integer UUIDS (1, 2, 3, ...)

Posted by "Randall Leeds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998054#comment-12998054 ] 

Randall Leeds commented on COUCHDB-1071:
----------------------------------------

The update sequence is already somewhat similar. While documents don't "keep" a single update sequence (it changes if they're updated), this at least provides a monotonic, auto-incrementing id to each revision *on a particular server*. Using the /_changes feed might be all you need, depending on your use case.

> Integer UUIDS (1, 2, 3, ...)
> ----------------------------
>
>                 Key: COUCHDB-1071
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1071
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: adisk
>              Labels: algorithm, uuid
>
> Please, create integer uuids.
> What need:
> - intger keys
> - autogenerated by CouchDB
> - sequential
> Like a 1, 2, 3, 4, 5,...

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

        

[jira] Resolved: (COUCHDB-1071) Integer UUIDS (1, 2, 3, ...)

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

Robert Newson resolved COUCHDB-1071.
------------------------------------

    Resolution: Won't Fix

The UUID's that couchdb generates need to give a very low probability of collisions, especially between servers.

We supply three algorithms (sequential, random and utc_random) which we feel provide that guarantee.

Nothing forces you to use CouchDB's generated UUID's. If you include a "_id" key in your document, it will be used. We only generate a UUID if you do not provide your own id.


> Integer UUIDS (1, 2, 3, ...)
> ----------------------------
>
>                 Key: COUCHDB-1071
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1071
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.2
>         Environment: All
>            Reporter: adisk
>              Labels: algorithm, uuid
>
> Please, create integer uuids.
> What need:
> - intger keys
> - autogenerated by CouchDB
> - sequential
> Like a 1, 2, 3, 4, 5,...

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