Hi,
I’m starting a new topic about the replicator 2.0, that I’m using in c# (Xamarin and console windows app).
since 2 days i’m testing my principal application, in which I’m able to add documents with “persons” informations.
I’m using my App with 3 differents Windows 10 (Fall creator version). I also created a simple monitor app that can be find here :
https://github.com/SteeveQuadra/SyncMonitor.wiki.git
I did open 2 issues on the couchbase lite github for some other related problems
My replicator is started always in continuous mode. The SyncMonitor repo contain the config file i’m using on my sync gateway server.
Use case 1 : The initial sync goes well until the end of the 39000 docs
=> The progess numbers stay equal and it seems that the replication work always well.
Use case 2 : (Random issue) I’m adding a person in my program, and save a new document in my local couchbase lite. The replicator status change into Busy, the total progress number increase, but the Completed number stay without increasing.
=> The documeent never go to the Bucket, until I Restart the application or Restart the replicator like that :
private void Restart(ReplicatorStatusMessage obj)
{
try
{
_replicator.RemoveChangeListener(_token);
_replicator.Stop();
_replicator = null;
_replicator.Dispose();
}
catch(Exception)
{ }
Connect();
}
private void Connect()
{
if (_serverInfo == null)
_serverInfo = _serverDal.Get();
if (_serverInfo == null)
return;
Uri target = new Uri($"blip://{_serverInfo.UrlServer}");
ReplicatorConfiguration replicationConfig = new ReplicatorConfiguration(_dataBaseGetter.Get(), target);
replicationConfig.Continuous = true;
replicationConfig.ReplicatorType = ReplicatorType.PushAndPull;
replicationConfig.Authenticator = new BasicAuthenticator(_serverInfo.Login, _serverInfo.Password);
_replicator = new Replicator(replicationConfig);
if (CrossConnectivity.IsSupported && CrossConnectivity.Current.IsConnected)
_replicator.Start();
_token = _replicator.AddChangeListener(_replicator_StatusChanged);
}
The Result is that the document is store in the bucket, but is not sync in all others sync gateway clients.
Use case 3 : After use case 2 situation, the progress numbers will never be equals.
=> The replication will never work fine anymore in this situation. It seems to watch some changes, the total numbers will increase with the number of changes that it should receive, but the completed number wilt stay at 0.
=> Is that possible to force the replication without killing the local database ?
Use case 4 : After the use case 2 situation : Uninstallation of the application and re installation.
=> If the initial replication goes fine until the end, I can find all the documents even those that wasn’t sync before reinstallation
I can use any computer I want, this random problem happend, and that’s always the starting point of replication issues.
I don’t know how to explain that in an github issues for you to be able to find the trouble. I can send my app folder in a private message if that can help to resolve this issue.
We chose couchbase because of the automatic replication, I really need it to work well.
What can I do to help to resolve this issus ?
Regards
Steeve