How to Tell When Replication Complete in Couchbase Lite


#1

Looking for a good way in iOS and Android to detect when replication of my db is complete? I have a way of monitoring each time there is a push and pull of live replication, but what would be the best way to detect when the two db seem to be caught up?


#2

How about making use of the changed event on the replication? It will give you details on the number of scheduled and finished changes, as well as the status of the replicator (active / offline / idle / stopped).


#3

If the replication is in continuous mode and no authorization(session id is wrong or expired), currently seems we can not know the situation by querying active tasks.

I could be nice if some event mechanism can be implemented for reporting replication status.


#4

if some event mechanism can be implemented for reporting replication status

That’s exactly what the Changed event is for.


#5

Thanks borrrden for the info!

My app is hybrid app using couchbase lite cordova plugin, I can not find correspondent REST API for that, missing documentation?


#6

You can find the replication status and change progress on the /_active_tasks endpoint.
See slide 27 onwards.

James