Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Continuous Replication status remains at REPLICATION_MODE_ACTIVE after replication is complete #86

Open
FrancoisMeriaux opened this issue Oct 25, 2014 · 5 comments
Milestone

Comments

@FrancoisMeriaux
Copy link

I just ran some test with the release 1.2.0. On Android, I observe that the status of a continuous replication remains in the state REPLICATION_MODE_ACTIVE even if all the documents have been replicated. And if I try to restart the replication, it immediately stops with the error message:

[ERROR] :  Sync: PullerInternal stopGraceful.run() finished
[ERROR] :  Sync: Change tracker stopped during continuous replication

This behavior does not occur with 1.1.0. With this version, when the replication is completed, the replication status is REPLICATION_MODE_IDLE, and the replication can be restarted.

I only see this issue with a continuous replication since with a replication that is not continuous, the replication stops after all the documents have been replicated, as intended.

@pegli
Copy link
Collaborator

pegli commented Oct 28, 2014

Looks like this is a bug in couchbase-lite-java-core:

https://github.com/couchbase/couchbase-lite-android/issues/445

I expect that they will get this fixed in the next release of the library.

@pegli pegli added this to the 1.2.1 milestone Oct 28, 2014
@tleyden
Copy link

tleyden commented Oct 28, 2014

@FrancoisMeriaux can you add instructions / sample code to reproduce as well as logcat logs in a gist? I've tried to reproduce this in a test case and haven't been able to so far.

The replicators are independent, so it would be great if you could just use the direction of the replicator that is having the problem (eg, puller), and don't start the other one. That makes the logs easier to read.

Please post to https://github.com/couchbase/couchbase-lite-android/issues/445.

@FrancoisMeriaux
Copy link
Author

Apparently, this is fixed in the master branch of couchbase-lite-android.

Although I built the libraries from this distribution, I could not make TiTouchDB run with them (probably because of https://github.com/pegli/ti_touchdb/blob/develop/mobile/android/lib/README.md ?).

This bug becomes critical since TiTouchDB 1.1.0 is not compatible with Android 5.0 which is currently being deployed. And 1.2.0 is fine with Android 5.0, but not with continuous replication. This is a cruel dilemma...

@tleyden
Copy link

tleyden commented Nov 18, 2014

@pegli let me know how I can help.

@FrancoisMeriaux
Copy link
Author

Ok, here is the update with release 1.2.1 : the original issue is fixed since the status of the continuous replication changes to REPLICATION_MODE_IDLE after the original replication is complete.

However, if a change occurs later, the replication triggers without the replication status changing to REPLICATION_MODE_ACTIVE. It remains in REPLICATION_MODE_IDLE. See the following Gist for logs : https://gist.github.com/FrancoisMeriaux/9e67254c13d3c5ae3135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants