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

Continuous Pull Replicator went to stopped instead of idle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 3.1.0
    • 3.1.0
    • LiteCore
    • Security Level: Public

    Description

      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

      Attachments

        Issue Links

          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:

                PagerDuty