Purged document after purge tries to be replicated from device

I have a replication filter for push set on a push replicator. The document gets rejected by replicator before purging after creation which is OK because filter is configured in that way.

2019-10-04 16:35:36.209 27546-28200/com.myProject V/CouchbaseLite/REPLICATOR: {n8litecore4repl6pushere#269} Doc ‘mirror_e352d060a-de37-40b5-b188-43d8be4871cc’ rejected by push filter

I do the purge:

2019-10-04 16:35:36.909 27546-27546/com.myProject V/CouchbaseLite/DATABASE: {DB#86} SQLiteKeyStore(default) del key ‘mirror_e352d060a-de37-40b5-b188-43d8be4871cc’ seq 0

This log is then shown (replicator touches document AFTER purge ??? ):

2019-10-04 16:35:36.926 27546-28200/com.myProject I/CouchbaseLite/REPLICATOR: {Repl#260} documentEnded mirror_e352d060a-de37-40b5-b188-43d8be4871cc flags=00 (1/7)

And then on my application level I have by DocumentReplicationListener following printed out for push replicator:

2019-10-04 16:35:37.130 27546-27546/com.myProject I/myProject.storage.couch.Replicator: REPLICATION: (replicatorA|PUSH): _id=mirror_e352d060a-de37-40b5-b188-43d8be4871cc,documentError= CouchbaseLiteException{CouchbaseLite,7,‘not found’},

That is weird. I assume you have a continuous replication running at the time of the purge?

Could you file an issue on Github, please? I’ve filed an issue here.

I just checked the code, and this is indeed a bug. The replicator listens for database changes and schedules each document to be pushed, but it doesn’t take into account that a change might reflect a purge, which should be ignored. Should be a simple two-line fix.

Is this causing problems for your app besides the incorrect logs & notifications?

I didn’t see other issues, but got me thinking if there is a bug in replicator push filters which could cause problems later so better to check it out.
Thanks on the clarification.