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
- is a backport of
-
CBL-5724 Replicator syncs from beginning when using prebuilt dbs synced from SG
-
- Closed
-