32

Yesterday, a Stack Overflow moderator election started, but I didn't get a notification in my inbox even though I have enough reputation to vote. I did get two other election messages at that same moment.

screenshot of inbox dialog

They're not in my global inbox either:

screenshot of global inbox

It was working two weeks ago when two other elections started, see this screenshot.

5
  • 5
    I also didn't get a notification but I assumed it's because I voted early when it started. Now I wonder if there even is such a condition or did I also (not) observe the same missing notification. Commented Jun 4 at 10:10
  • 20
    This is a valid bug report; only about 10% of eligible voters got the notification. We're looking at it. Commented Jun 4 at 11:00
  • 1
    Huh, I got the notification. Guess I was among the 10%. Commented Jun 4 at 15:53
  • @VLAZ I think you have an answer to your question now: you get such a notification even if you've already voted. Commented Jun 5 at 5:55
  • 2
    @Glorfindel That means I should get a second vote. Where is my second vote? How do I speak to a manager about the false advertising? I want my money back! /s Commented Jun 5 at 6:11

1 Answer 1

30

Problem #1

Ok, so the election notification system is a little old and wasn't idempotent. It was designed to just kick off a single background job that queued up all election inbox notifications for eligible voters. This would get queued at the moment in time we transitioned an election from one state to another. The problem is, if the background job was cancelled for any reason, nothing would or could automatically resume processing. And one thing that killed the background job is just deploying the application, which restarts all the pods. So we didn't end up sending out election notifications for most users on Stack Overflow for the current election.

Solution #1

We created a one time backfill route to check who was eligible and compare that to who had already gotten a notification. And then use the same background job to queue up the people who had not yet received an inbox notification. Shipped it to prod and sent out notifications - yay!

Problem #2

In so doing though, we accidentally queued the same job twice. Most people had not yet gotten a notification, so both background jobs started queuing notifications to the same group of people at the same time. Because the job kicks off in the background, it's quite pesky to try to turn it off. By the time we had noticed the issue, we weren't able to restart any pods manually (what caused the suspension in the first place).

Some users may see duplicate notifications like this

screenshot example of duplicate election inbox notifications

Solution #2

Tomorrow morning, we'll try to go through and see if we can remove duplicate inbox notifications for people. But by then some folks will have already logged in.

UPDATE to #2 - After discussing internally, we'd like to leave the duplicate notifications issue as is. It will impact ~500k users, of which ~5k have already seen it. There's no pre-existing route to remove that many notifications, so we'd have to ship a new one-time use script / job and possibly even risk me showing up here again for a Problem #3. The impact to users should be fairly low, and inbox notifications should get pushed out of view over time eventually.

If there are folks who feel strongly otherwise and think it's worth addressing, feel free to comment in support of the cleanup, but we have lots of other stuff to help deliver for the site and I'd love to focus more of our engineering time on that.

Hopefully, two notifications is better than none.

Sorry to folks for the extra inbox pings, and please go vote!

4
  • KyleMit, is this a network-wide problem, or is it specific to SO? Commented Jun 5 at 8:56
  • 1
    @RandomPerson looks like it's not specific to SO, except that the bigger the site, the more likely it is to fail. Commented Jun 5 at 9:07
  • 6
    @RandomPerson, the cause of the problem could technically occur on any SE network site, but in this particular instance, we only failed to send (and then double sent) notifications on SO Commented Jun 5 at 19:16
  • 2
    Sounds like a pragmatic decision. I'd +1 if I hadn't already done so. Thanks for your efforts! Commented Jun 5 at 19:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.