Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3315

Introduce randomness to initial revisions of docs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 3.0.0
    • Database Core
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mayyas Mayya Sharipova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: