Here is my situation. I have a workbook that is backed by a Couchbase database, which syncs the workbook’s contents (e.g. ink strokes) with the remote. I’ve implemented split screen functionality now, so the user can open two workbooks at once, side-by-side. When workbooks are different, this works just fine. When workbooks are the same, however, I’m running into this issue, and I want to determine whether there is something wrong with how I’m using Couchbase or if this is an issue that I should report.
When it’s the same workbook open on both sides, each has its own instance of the Database class pointing to the same physical database on the device. Each Database instance has a single push-and-pull replicator. However, when a remote change comes in from another device, occasionally not all DocumentReplication events are delivered to both replicator listeners (one for each Database instance).
For instance, let’s say 5 events are pulled in remotely. One Database instance and its replicator will get all 5 events delivered to its DocumentReplication listener, but the other one might get only 2 or 3. This does only happen occasionally, but it’s often enough that it is an issue.
I did look into whether Couchbase supports more than 1 Database instance pointing to the same physical database, and according to a couple of forum posts and a blog posts, it does. I’m not sure if there is something else I might be doing wrong, or if anyone else is familiar with this problem and might have some tips on how to fix it? Or is this an issue with Couchbase?
I’m using CouchbaseLite for Android, and I am using 2.7.0, but yesterday I upgraded to 2.8.0 to see if the problem resolved itself, but it did not.
Thanks for any help.