couchbaselabs / TouchDB-Android

CouchDB-compatible mobile database; Android version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pull replication does not work - getActiveReplicators() list still populated

cjami opened this issue · comments

This used to work fine but one or two commits (all the way to latest) after d6be09b results in a break in our pull replication, both authenticated and not authenticated.

V/TDCollateJSON(28131): SQLite3 handle is 1485028400
V/TDDatabase(28131): TDPuller[<server_location>] STARTING ...
D/dalvikvm(28131): GC_CONCURRENT freed 3763K, 23% free 13378K/17223K, paused 21ms+16ms, total 77ms
V/TDCollateJSON(28131): SQLite3 handle is 1485310264
V/TDDatabase(28131): TDPuller[<server_location>] STARTING ...
V/TDDatabase(28131): com.couchbase.touchdb.replicator.TDReplicator$4@41a49790: Replicating from lastSequence=3
W/TDDatabase(28131): TDPuller[<server_location>] starting ChangeTracker with since=3
V/TDDatabase(28131): Making request to <server_location>/_changes?feed=normal&heartbeat=300000&since=3
V/TDDatabase(28131): com.couchbase.touchdb.replicator.TDReplicator$4@419025f8: Replicating from lastSequence=8
W/TDDatabase(28131): TDPuller[<server_location>] starting ChangeTracker with since=8
V/TDDatabase(28131): Making request to <server_location>/_changes?feed=normal&heartbeat=300000&since=8
W/TDDatabase(28131): Change tracker calling stop
D/TDDatabase(28131): changed tracker asked to stop
D/TDDatabase(28131): change tracker in stopped
D/TDDatabase(28131): posting stopped
W/TDDatabase(28131): TDPuller[<server_location>]: ChangeTracker stopped
V/TDDatabase(28131): TDPuller[<server_location>] STOPPED
D/TDDatabase(28131): change tracker client should be null now
V/TDDatabase(28131): Chagne tracker run loop exiting
D/dalvikvm(24085): GC_CONCURRENT freed 464K, 6% free 12107K/12807K, paused 12ms+6ms, total 49ms
W/TDDatabase(28131): Change tracker calling stop
D/TDDatabase(28131): changed tracker asked to stop
D/TDDatabase(28131): change tracker in stopped
D/TDDatabase(28131): posting stopped
W/TDDatabase(28131): TDPuller[<server_location>]: ChangeTracker stopped
V/TDDatabase(28131): TDPuller[<server_location>] STOPPED
D/TDDatabase(28131): change tracker client should be null now
V/TDDatabase(28131): Chagne tracker run loop exiting

No data is pulled and there is no further activity after this, however we use a background thread that continuously queries getActiveReplicators() on the database to figure out when a sync has completed (we only do pull replications).

In this case the active replicators list is always populated after this.

We need a test that somehow when replication are dropped (maybe by the server) that this API correctly lists their status.