[
https://issues.apache.org/jira/browse/COUCHDB-3315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15932725#comment-15932725
]
ASF GitHub Bot commented on COUCHDB-3315:
-----------------------------------------
GitHub user rnewson opened a pull request:
https://github.com/apache/couchdb-fabric/pull/92
Generate a random value at the coordinator if creating docs
COUCHDB-3315
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-fabric
3314-random-initial-rev
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-fabric/pull/92.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #92
----
commit 49ac6b56af324f57634aa0b93fbfc8ba39a61e40
Author: Robert Newson <[email protected]>
Date: 2017-03-20T14:26:09Z
Generate a random value at the coordinator if creating docs
COUCHDB-3315
----
> 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
> Fix For: 3.0.0
>
>
> 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)