We’re running into a strange issue with swift 3 and CBL 1.4 occasionally stopping/blocking pull replication writing documents to the device.
After enabling:
CBLManager.enableLogging("Sync") CBLManager.enableLogging("SyncVerbose") CBLManager.enableLogging("ChangeTracker") CBLManager.enableLogging("ChangeTrackerVerbose"),
I was able to see these errors coming through:
Sync: CBLBulkDownloader[…/_bulk_get]: Starting new document; ID=“(null)”
Sync: CBLBulkDownloader[/…/_bulk_get]: Finished document
Sync: CBLMultipartDocumentReader[_id=“(null)”]: Finished loading (0 attachments)
Sync: Giving up on {-vRw6KYPEQEij-gZ1LdgoBi #2-541b03f216a084e57e0225c8f68fb485}: CBLHTTP[404, “not_found”]
The logs appeared for several documents, and after viewing a handful of the documents, I could see the revision in the iPad’s log was older than the revision available on the gateway/server.
We’ve encountered the “Giving up on” logs numerous times when this pull issue occurs.
When we encounter this error, it blocks all pull replication from saving any of the pulled documents to the device. However, push replication behaves normally.
This issue is difficult to recreate in our test environment, but we frequently see it at customer locations.
Deleting and reinstalling the database from the iPad solves the issue. However, if we leave the iPads alone long enough, the pull replication eventually kicks back on.
It’s worth noting we also saw this issue in CBL 1.3, but we didn’t start seeing this problem until we switched to swift 3.
Has anyone else encountered this issue, or a similar problem? Push replication continues normally, but pull replication seems to be blocked.
Thanks