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

Mutating _rev on localDocument in conflict resolver results in merge error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.0
    • 3.0
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 78
    • 3

    Description

      resolveDocMerge extracts the previous local rev from the mutable conflict.localDocument.  However, this may have been modified by the conflict resolver.  As a result, conflict resolvers that return a modified localDocument (stripping out _rev) will result in an error like:

      Error resolving conflict for <ud>mydoc</ud>: Attempted to tombstone active revision for doc (mydoc), but provided rev () doesn't match current rev(14-f9841ac5d3bfa186fbd6f52d1f747cd8)
      Any code that works with Conflict after conflict resolution has run should treat it as mutated, and only use when appropriate (rev check for local/remote wins, and body for merge)

      Attachments

        Issue Links

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

          Activity

            There are no commits yet on this issue.

            People

              jacques.rascagneres Jacques Rascagneres
              adamf Adam Fraser
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty