Hello. I am running a three node cluster of Couchbase version 7.6.3 with two Sync Gateway version 3.1 instances. The middle of last week, I manually deleted around 200,000 documents from a bucket via a delete query in the UI query tab (Delete from _default where …). I also have an eventing function on that bucket which has both an OnDelete and OnUpdate handler. I made sure to undeploy the eventing function before I ran my delete query, as I didn’t want the OnDelete handler to execute for these documents. I redeployed the eventing function maybe 10 minutes after the query finished executing.
That worked fine, however, a couple days later the OnDelete handler in my eventing function got called for all the 200,000 documents that I deleted a couple of days earlier. I’m very confused by this, as I’ve verified these documents where not resurrected by an admin or by normal user workflows. I have the metadata purge interval set to three days which roughly aligns with when OnDelete got called, is it possible auto-compaction caused OnDelete to be called for all the deleted documents? Thanks in advance for any help.