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

Replicator syncs from beginning when using prebuilt dbs synced from SG

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.8
    • 2.8.4
    • LiteCore
    • Security Level: Public
    • None
    • 4

    Description

      Scenarios:

      1. Create a prebuilt database which is synced with SG using a push-and-pull replicator or using only pull replicator (either single shot or continuous).

      2. In an application, copy a prebuilt database using Database's copy() method.

      3. Create a replicator with the exact some config used in #1 and start the replicator.

      4. Expect that the replicator will continue from the checkpointed used when creating the prebuilt database BUT the replicator starts to sync from sequence zero.

      What are the cause of the issue?

      When computing the remote document ID for getting the local checkpoint info, for the case of using prebuilt dbs, we have a logic to transform the replicator endpoint URLs in various forms (e.g. append port 80 or 443) to account platform inconsistencies in the formatting the URL to use in the computation (CBL-1515). However, the code doesn't use the original endpoint URL is not used for the computation. As a result, the local checkpoint info cannot be read, and that causes the replicator to sync from beginning when using the prebuilt database.

      Impacts:

      • The replication with prebuilt database will start from the begining even though the same replicator configuration used when constructing the prebuilt database is used.
      • All couchbase lite platforms since 2.8.4 and 3.0.0.

      Workaround:

      • There is no workaround I would like to recommend.

      Attachments

        Issue Links

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

          Activity

            People

              jianmin.zhao Jianmin Zhao
              pasin Pasin Suriyentrakorn
              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