Email notifications get skipped on busy topics


(Sam Saffron) #1

This has already popped up twice:

https://meta.discourse.org/t/missing-notification-emails-on-busy-topics/13380?source_topic_id=38422

and

I just reprod it locally and am working on fix but I wanted to explain what is going on:

To repro:

  1. On account A watch a topic
  2. On account B reply to topic twice.

What happens:

  1. We generate a notification for A saying that a topic got a reply
  2. We delete notification (1)
  3. 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

  1. 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.

  2. 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.


(Allen - Watchman Monitoring) #2

Thank you @sam I’ve seen this too, but didn’t know enough about what other users were doing to create such a detailed report.


(Jeff Atwood) #3

So the repro is for the same person to post twice in the same topic? Seems a bit edge-casey if so.


(Sam Saffron) #4

No … any 2 people, when you see

:arrow_backward: N replies” in your notifications this condition is hit. Can be any 2 different people.

Examples of this condition are here:


(Sam Saffron) #5

Fixed per:


(Sam Saffron) #6