Skip to:
This has found by running a test in iOS : https://github.com/couchbase/couchbase-lite-ios/blob/master/Objective-C/Tests/DatabaseTest.m#L1534-L1564. The test failed as it is waiting for both push and pull replicator to be IDLE. It turns out pull replicator just went to stopped instead of idle.
I have debugged and it turned out there is a bug in `Replicator::computeActivityLevel()` that causes the following line to get executed when the continuous pull replicator is idle.
https://github.com/couchbase/couchbase-lite-core/blob/master/Replicator/Replicator.cc#L427
The real problem is that isContinuous() returns false. The code is very suspicious and it also loses track of the collection index:
https://github.com/couchbase/couchbase-lite-core/blob/master/Replicator/Worker.hh#L148-L153
Build couchbase-lite-log-3.1.0-172 contains couchbase-lite-core commit 2444918 with commit message:https://couchbasecloud.atlassian.net/browse/CBL-3526#icft=CBL-3526 : Continuous Pull Replicator went to stopped instead of idle (#1535)
Build couchbase-lite-cblite-3.1.0-162 contains couchbase-lite-core commit 2444918 with commit message:https://couchbasecloud.atlassian.net/browse/CBL-3526#icft=CBL-3526 : Continuous Pull Replicator went to stopped instead of idle (#1535)
Build couchbase-lite-net-3.1.0-87 contains couchbase-lite-core commit 2444918 with commit message:https://couchbasecloud.atlassian.net/browse/CBL-3526#icft=CBL-3526 : Continuous Pull Replicator went to stopped instead of idle (#1535)
Build couchbase-lite-c-3.1.0-144 contains couchbase-lite-core commit 2444918 with commit message:https://couchbasecloud.atlassian.net/browse/CBL-3526#icft=CBL-3526 : Continuous Pull Replicator went to stopped instead of idle (#1535)
Build couchbase-lite-ios-3.1.0-209 contains couchbase-lite-core commit 2444918 with commit message:https://couchbasecloud.atlassian.net/browse/CBL-3526#icft=CBL-3526 : Continuous Pull Replicator went to stopped instead of idle (#1535)
This has found by running a test in iOS : https://github.com/couchbase/couchbase-lite-ios/blob/master/Objective-C/Tests/DatabaseTest.m#L1534-L1564. The test failed as it is waiting for both push and pull replicator to be IDLE. It turns out pull replicator just went to stopped instead of idle.
I have debugged and it turned out there is a bug in `Replicator::computeActivityLevel()` that causes the following line to get executed when the continuous pull replicator is idle.
https://github.com/couchbase/couchbase-lite-core/blob/master/Replicator/Replicator.cc#L427
The real problem is that isContinuous() returns false. The code is very suspicious and it also loses track of the collection index:
https://github.com/couchbase/couchbase-lite-core/blob/master/Replicator/Worker.hh#L148-L153