This has already popped up twice:
https://meta.discourse.org/t/missing-notification-emails-on-busy-topics/13380
and
I just reprod it locally and am working on fix but I wanted to explain what is going on:
To repro:
- On account A watch a topic
- On account B reply to topic twice.
What happens:
- We generate a notification for A saying that a topic got a reply
- We delete notification (1)
- We create a new notification that rolls up (1)
This rollup behavior messes up the email notifier, it tries looking up notification (1) but it is no longer in the table, so that notification is skipped.
This leads to 2 very bad side-effects
-
Email notification can be delayed way beyond the default window (10 minutes) … repro is quite simple, post a reply in watched a topic every 9 minutes and you will not trigger notifications ever.
-
Email is “rolled up” unintentionally. Previous replies becomes a “critical” piece of information otherwise you lose reply notifications on active topics.
The fix though is fairly complicated, so I just wanted to log this here to explain what it is I am fixing.