couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antony Blakey (JIRA)" <>
Subject [jira] Commented: (COUCHDB-465) Produce sequential, but unique, document id's
Date Thu, 20 Aug 2009 08:40:14 GMT


Antony Blakey commented on COUCHDB-465:

I remember a discussion about assigning a UUID to a database to allow external view providesr
to more reliably associate indexing artifacts with a given db instance (given that names can
be duplicated over a create/delete/create boundary). I suggested that this could be used in
document ids (and revids) and the response was that this was a privacy risk because the originating
database's identity would leak into the peer group. It seems that this proposal has the same
characteristic because you can identify the common source of a set of documents. Is this no
longer a concern? If not, then how about revisiting the idea of assigning each database a
UUID on creation, and using that UUID as a document identity prefix?

> Produce sequential, but unique, document id's
> ---------------------------------------------
>                 Key: COUCHDB-465
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>         Attachments: couch_uuids.patch, uuid_generator.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