Make sure to not miss updating the latest etag in the replicated status, if the etag is not exactly match but lower. In my case the etag was 0, but still need to be updated.
Use the latestEtag which in order to avoid not updating the latestEtag in some cases
Correctly set the latestEtag by using a currentLatestEtag inside the ExecuteAllInterleaved method instead of sharing there the same latestEtag. This let me to then set latestEtag to the max currentLatestEtag. This fixing a bug where the db tried to do replication from scratch infinitely.