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

Treat resurrected tombstones as non-conflict when no shared history

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: Lithium
    • Component/s: SyncGateway
    • Security Level: Public
    • Labels:
    • Sprint:
      CBG Sprint 60
    • Story Points:
      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

          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-3.0.0-36 contains sync_gateway commit b206472 with commit message:
          CBG-1127 Treat SDK resurrect as non-conflict (port to master) (#4832)

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-3.0.0-36 contains sync_gateway commit b206472 with commit message: CBG-1127 Treat SDK resurrect as non-conflict (port to master) (#4832)

            People

            Assignee:
            adamf Adam Fraser
            Reporter:
            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