How to know that the Document is successfully Sync with the Couchbase Server DB?


I am trying to do only a push Replication. I have created a document and it is getting successfully pushed to server DB. I only get the successful Sync count in the Push Replication change listener but not exactly the Synced Document IDs that are synced.
So My question is how to get the document Id of the successfully synced Document or is there any property for the document which says that the document is successfully synced?


Hello @ketankumbhare

You can call the currentRevisionID that returns a String type. For Android this look like:

public String getCurrentRevisionId()

Then you can get the document of a particular Revision that it belongs to using and retrieve its properties.


Thanks for the quick reply.

I have tried using the getCurrentRevisionID() method. but again, I am getting the same the same revision ID for all the document that are synced.

So do I need to implement the pull replication to get the new revision for the synced documents.


Also I have tried implementing the Pull Replication but Again I am getting the same revision IDs for all the documents.
It seems that unless and until the document is not getting updated the revision will not change.


What platform are you using? (It’s always good to specify that when you ask a question.) iOS/Mac has a pendingDocumentIDs property that will tell you which documents have changes that haven’t yet been pushed by a particular replicator. I don’t think this has been ported to the other platforms yet.


I forget to add it . I am using the Android Mobile Platform. Do you have any idea when will it be ported for Android platform?


No, sorry. Check the Github repo and add an issue requesting it if there’s not already one filed.


There is already an issue added. You could + your request there to bump its priority.