Good morning,
I would like to understand better the numbers coming from the replicator status
I have this little piece of code
ReplicatorConfiguration replConfig = new ReplicatorConfiguration(database, targetEndpoint);
replConfig.setReplicatorType(ReplicatorConfiguration.ReplicatorType.PUSH_AND_PULL);
replConfig.setAuthenticator(new BasicAuthenticator(USER_NAME, PASSWORD));
replConfig.setContinuous(true);
this.replicator = new Replicator(replConfig);
this.replicator.addChangeListener(change -> {
Progress progress = change.getStatus().getProgress();
Log.d(Session.TAG, String.format(Locale.US, "replicator %d / %d", progress.getCompleted(), progress.getTotal()));
CouchbaseLiteException tw = change.getStatus().getError();
if (tw != null) {
Log.i(Session.TAG, tw.getMessage(), tw);
}
});
this.replicator.start();
but I noted in the log I have this strange output
2019-09-30 12:10:20.749 4998-4998: replicator IDLE 33725 / 43893 <- nothing was updating
2019-09-30 12:10:20.849 4998-4998: replicator BUSY 33725 / 43893 <- start updating
2019-09-30 12:10:20.877 4998-4998: CHANGED 1 documents <- 1 doc
2019-09-30 12:10:21.044 4998-4998: replicator BUSY 33726 / 43894 <- still updating
2019-09-30 12:10:21.048 4998-4998: replicator IDLE 33726 / 43894
I can see the numbers before and after the updating is consistent (only 1 document increased the counter for both total and completed), but between completed and total the numbers are really far each other.
I am using the counters to show an updating progress, and you can see as those 2 numbers (completed vs total) are not reliable.
Thanks for any feedback.