Sync Gateway not removing documents from channel

Hello everybody, my sync gateway is currently not syncing documents when I remove them from the channel. It’s strange because if I add a document to a channel, it gets synced right away to that channel, but when I remove it (all operation are performed from the couchbase admin) sync gateway continues to show the document in the removed channel.
If I restart sync gateway the all the documents are shown in the correct channel.
Anybody knows what can cause this behaviour?

That shouldn’t be the case, but I can’t tell what might be going on without a few more details.

How specifically are you removing the document from the channel? And when you say ‘sync gateway continues to show the document in the removed channel’, what operation are you using?

Hi Adam, thanks for the reply.
Sorry I didn’t specify that I’m showing the couchbase documents through an Android app.
I’m removing documents from channels by emptying via couchbase admin panel their tags property, that is the array that the sync function is using. Quick example, say I have a document like this


{
"prop1": "....",
"prop2": "....",
"tags": ["channel1", "channel2", ...]
}

I empty the tags array like this

{
"prop1": "....",
"prop2": "....",
"tags": []
}

And I can see inside the sync gateway logs that the document is removed from the channel (I don’t have right now the log to copy paste, if you need it I can retrieve it). This is the sync function:

function(doc) {
        channel(doc.tags);
      }

Problem was that inside the Android app couchbase lite was not removing the document. I’m wrinting was because after I updated the couchbase lite library the problem disappeared. I updated from

 implementation 'com.couchbase.lite:couchbase-lite-android:2.6.0'

to

implementation 'com.couchbase.lite:couchbase-lite-android:2.7.1'