Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-1127

Treat resurrected tombstones as non-conflict when no shared history

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.8.0
    • SyncGateway
    • Security Level: Public
    • CBG Sprint 60
    • 5

    Description

      Document resurrected directly in the bucket (i.e. not via SG) don't preserve revision metadata, due to known server limitations (it's prohibitively expensive to query for tombstones for each insert).

      This scenario is currently be treated as a conflict by Inter-Sync Gateway replication, in two scenarios:

      1. Documents resurrected on the active peer are rejected by the remote, and don't get replicated.  (There's nothing to be pulled, so there's no trigger for conflict resolution)
      2. Documents resurrected on the passive peer incorrectly trigger conflict resolution when pulled, and the default 'delete wins' policy results in the document being re-tombstoned after replication.

      A possible solution for this is to allow disconnected branches to be written (and not be flagged as a conflict) when there are no other active leaves on the rev tree. The 'disconnected branch' requirement is necessary to ensure actual conflicts between a delete and an update are properly flagged as conflicts.

      Tests should be included both for the document resurrect case, but also the conflict case (if not already present) to ensure this enhancement doesn't break other delete-related functionality.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            adamf Adam Fraser
            adamf Adam Fraser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty