Dear Priya,
We are facing a problem with our Couchbase Lite 1.4 where it keeps pulling documents although we have changed the channel to a different one.
Couchbase Lite Pull Replicator configuration:
pull.channels = [“channel_a”];
We have a cronjob running that will check all documents of certain type that are older than 3 months and we changed their channel to “channel_a_history”.
After the cronjob changed the channel, our app still pulling the document with the updated channel reflected.
Is this a known issue of Couchbase Lite? Is there a better way to do this? Our ultimate goal is to keep our app’s performance synchronization process (pulling process), since right now some users reported that when they open our app the synchronization process takes a lot of time and sometimes it stuck.
Really appreciate your advice on this.
Is the GUEST user still active? If so the user will still have access to the document and it will get pulled. It is not a known issue and the way you are attempting to do things is correct so I think something else is going on.
Hi Jim,
Yes, the GUEST user is still active. We have set the pull.channels specifically to “channel_a” so we assume once the channel of a document is changed on Couchbase Server, the replicator will not pull it anymore.
Really appreciate if you can enlighten us on the relationship between this behavior and the GUEST user.
Are you running other pullers as well? If so they might be receiving the document inadvertently. Otherwise, I wouldn’t expect the document to come through except for possibly a removed notification (though in this case I think not because technically you didn’t lose access as a user). Have you modified your sync function at all?
We didn’t update the sync function, so basically it is using the default:
function(doc){channel(doc.channels);}
And we only have 1 pull replicator in our app. Will disable the GUEST access fix this issue?
It sounds like a bug, but it’s odd that something simple like that would pass through our testing. Have a look at the sync gateway logs and make sure the requests are coming through with the “by channel” filter on them.
I think it’s due to our Couchbase versions, it is a legacy system.
Our Couchbase is a very old one 3.0.2
Our Couchbase Lite is 1.4
Our Sync Gateway is 1.0.3
Wow those versions are well past end of life and end of support (except lite) so probably no one can help with that unless you upgrade.
Just to follow up this very old post.
I updated the libraries to
Couchbase server 5.0
Sync Gateway 1.5
Couchbase lite 1.4.1
But we are still facing the same issues. Just to add more information, we are using the admin user configured in sync gateway json file, it has access to all channels, guest is disabled.
Our app performance becomes very bad especially at initial load when the user reinstall the app because the pull replicator is downloading all the documents to the device! It can take up to 20 minutes for the initial pulling to be done.
Really appreciate any help or insight that we can use to improve the performance.
Your case looks like it calls for preseeded databases. You can install a canned DB with existing documents inside of it and the replicator will basically pick off where the preseeded database left off instead of starting again from the beginning. You can make use of the replaceDatabase
method on Manager