Mayya Sharipova created COUCHDB-3315:
----------------------------------------
Summary: Introduce randomness to initial revisions of docs
Key: COUCHDB-3315
URL: https://issues.apache.org/jira/browse/COUCHDB-3315
Project: CouchDB
Issue Type: Improvement
Components: Database Core
Reporter: Mayya Sharipova
This ticket is for couch 3.0 to add randomness to the initial revision of any
doc with an option to specify that random value in the API by a user.
While a goal for COUCHDB-3314 is to allow a user to supply a random initial
revision for a doc through API when desired and if not supplied a deterministic
{0, <<>>} will be used for all docs; the goal of this ticket is to make
initial revisions of all docs to be random. This is done to account for
situations when a document is continually purged and recreated.
This change does affect one specific behavior. Any user that currently sends
identical writes to two independent databases and then replicates between those
databases would see conflicts whenever they create a new database. The downside
of this change is that there's a use case where someone may make the same exact
writes to two or more databases and expect there to be no conflicts due to
replication.
It is important to note that the 0-$rev only affects document creation. Once
a document exists, updates to the document will continue to update their hash
in the same deterministic fashion. Ie, once a document exists, identical
updates will result in identical revisions.
________________
Changes to code:
Swap the logic in new_revid to produce random revisions for the initial creation
{0, <<>>} which it is now, we'll replace it with randomness the <<>> binary bit
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)