I am live syncing a freshly minted pouchdb (3.3.1) to an established (iris) couchdb.
The initial replication happens successfully (pause event fire
You can't really compare the seqs across two databases. However, you can do a db.info()
on the remote database, grab the update_seq
, and then compare that to the last_seq
that is given to you in the on('change')
event during replication. This will tell you how much progress you've made.
If you would like to see an example of this, the NPM Browser does exactly this, to show the percent counter at the top. (It uses pouchdb-load as well, but the principle is the same, since the seqs are reported there as well.) The code is open-source, so feel free to check out how it works. :)
Edit: as pointed out in a comment, if you are using sync
rather than replicate
, you need to check the direction
parameter when reading last_seq
. Also for Cloudant, you will need to split the string on -
to get the integer seq.