couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Newson (JIRA)" <>
Subject [jira] Commented: (COUCHDB-465) Produce sequential, but unique, document id's
Date Wed, 26 Aug 2009 23:08:59 GMT


Robert Newson commented on COUCHDB-465:

Just capturing that I agree with Paul that random should be the default; his patch adds sufficient
documentation for the user to make an informed choice. random uuids generation is the least
surprising of the three behaviors, so it heads off interminable "why do my ids look kinda
similar?" discussions.

Is this going into 0.11?

> Produce sequential, but unique, document id's
> ---------------------------------------------
>                 Key: COUCHDB-465
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>         Attachments: 041-uuid-gen-seq.ini, 041-uuid-gen-utc.ini, 041-uuid-gen.t, couch_uuids.patch,
> Currently, if the client does not specify an id (POST'ing a single document or using
_bulk_docs) a random 16 byte value is created. This kind of key is particularly brutal on
b+tree updates and the append-only nature of couchdb files.
> Attached is a patch to change this to a two-part identifier. The first part is a random
12 byte value and the remainder is a counter. The random prefix is rerandomized when the counter
reaches its maximum. The rollover in the patch is at 16 million but can obviously be changed.
The upshot is that the b+tree is updated in a better fashion, which should lead to performance

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message