Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-2579

409 retry can result in invalid remote ancestor ID

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 3.0
    • 2.8.6
    • LiteCore
    • Security Level: Public
    • None
    • Jim 61
    • 5

    Description

      This is an edge case, but was reported in a CBSE.  If a backup of a server bucket is made, but replication continues, and then later the bucket is restored this invalidates the remote ancestors in the local database and causes a lot of conflicts that end up in a situation where CBL thinks that the parent rev ID is the same as the current rev ID.  Half a day of research went into this so it's not easily summarized here but basically the checkpoint is rewound, causing a replication restart in which for some reason the remote ancestor persists so when the pusher goes to send certain revisions the sequence goes something like this:

      1. Send doc gen 2 with no parent
      2. 409 received
      3. Lookup remote ancestor and retry with remote ancestor (this fails because the remote ancestor is the same gen 2 revision ID)

      Attachments

        Issue Links

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

          Activity

            People

              jimb Jim Borden
              jimb Jim Borden
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty