Too many "zero items in collect set" error

I was wondering if someone has encountered this error before zero items in collect set.

Looking at the code, it seems like when there are no set members in redis, this error happens, but shouldn’t there be at least one if the thread is making its way to that snippet?

Also the deduplication delay is configured to 200ms and i am almost certain that the code between the SADD and SMEMBERS should not take more than (200*2)ms so that the record expires.

For posterity, this issue happens when the application is under heavy load (too many messages). I am going to bump up the CPU memory and see if it resolves it.