I’m working on my project with a couchbase server 5.0, sync gateway 1.5 and couchbase lite 2.0, db19, in a Xamarin forms solution, UWP project active.
I’m displaying the status of my replicator, and the numbers (humanly incomprehensible) found in the status progress : Total and Completed.
I first started by inserting 18 documents in my bucket. The sync work find in few secondes, the numbers Total and Completed was equals, and I was able to read my documents from my couchbase lite.
Well, proud of my work, I inserted 59600 documents, (with 2 dates and 5-6 strings), nothing big. It took my program 3 minutes to insert the documents.
That was the begining of the problems.
The numbers Total and Completed are nevers equals anymore, the sync status is always Busy. After 30 minutes, I stopped my program, and restarted it, it just inserted 6000 documents.
After 2 and half hours, I can count only 21000 records inserted.
I don’t understand why it’s so long.
What can I give you for you to understand this problem ?
Did you wrap an inBatch block around the insertions? If not, every document gets written inside a separate data-store transaction, which is much slower. I have a performance test that can add 12k small documents in a few seconds.
The numbers Total and Completed are nevers equals anymore, the sync status is always Busy.
Sounds like a replicator bug with detecting when replication is complete. How long does it take for the Completed value to stop updating? That’s probably the true time to replicate.
If you could send a copy of the database (the .cblite2 directory), I can try to reproduce this.
So, now I’m using the DB21 version, and I uninstalled my app from my computer and started back from scratch with my replication.
The status of the replicator is more realistic, It shows me that the replication stopped. At least, it shows what I thought it was doing in db19.
After few seconds of busy status, and an increasing of the Total progress number, the replicator status goes to stopped, and never came back to busy, not even Idle.
Each time I’m starting my application, same scenario, and the count of my documents increase a little, but the replication don’t do his job.
I tried to cut my connectivity and start it back, and force the call of the raplicator.Start() methode, but it seems it’s not the way to do it.
I finaly find that the LastError Exception is now into the status, under the name of Error. So I displayed it and I have this exception : Message = “LiteCoreException (1005): no status code received”
Don’t have any Idea of how to correct that. any help ?