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

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8.0
    • Fix Version/s: Lithium
    • Component/s: SyncGateway
    • Security Level: Public
    • Labels:
      None
    • Story Points:
      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 comments yet on this issue.

              People

              Assignee:
              The One The One
              Reporter:
              adamf Adam Fraser
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty