Quantcast
Channel: Mobile - Couchbase Forums
Viewing all articles
Browse latest Browse all 1117

Document still exists on couchbase lite when out of the channel

$
0
0

Good morning everybody
I am facing this behavior and I do not understand if it’s the right one or there is something missing in the logic.

We have an android application with couchbase mobile lite and the syncgateway 2.7.3 (cb server 6.5.1)

  • The application has a continuous replicator with a single channel “A”
  • The application generates a document DOC where DOC.type = “B”
  • on the sync gateway, we have a function like this one
    function (doc, oldDoc) {
    if(doc.type===‘A’) {
    channel(‘A’);
    } else {
    return;
    }
    }

The point is to generate a document which immediately after the creation will be removed from the channel ‘A’
In fact, in the sync gateway logs I have a line like
2020-08-12T13:37:01.922+02:00 [INF] CRUD: Doc "ARCHIVE_b4cc1149-eaf8-40d1-b1cf-5ccdaac821bb" / "1-1d9fb34eb6d9d552e690394baaa466c337adcd9e" in channels "{}"

but the document still exists on the couchbase lite database, the replication is still configured to have documents only of the channel “A” so why is still there? Do I have to purge manually? When? The document must not exist but it’s not clear to me how to deal with this case.

Thanks for any help.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1117

Trending Articles