gotosocial
gotosocial copied to clipboard
[bug] Duplicate boost notifications
Describe the bug with a clear and concise description of what the bug is.
Fairly often lately, I've received duplicate poll notifications. Usually only two notifications total, but just now I received ten identical boost notifications from the same user at the same time for this post: https://alpha.polymaths.social/@amin/statuses/01HW1Z0MMSCT07Q7V9ADZQXPX4
They remain when I close my client and reload the notifications list and across multiple clients.
What's your GoToSocial Version?
v0.15.0
GoToSocial Arch
amd64 Binary
What happened?
No response
What you expected to happen?
I expect only to receive one notification per boost.
How to reproduce it?
No response
Anything else we need to know?
If it helps at all, I think I've only seen this problem with boosts from remote instances.
I've seen it too and think I know the cause! It's to do with multiple people from your instance receiving the boost, and the notif creation not being debounced, I think.
How does that work? I'm having trouble imagining multiple people "receiving" a boost…
Oh, like in their home timeline?
Say 5 people on your instance follows the same person, and that person boosts the status of one of you. 5 people on your instance receive the Announce Activity in their inbox. Normally GoToSocial deduplicates side effects to make sure they're only performed once (in this case, creating a notification and storing the boost in the database). But I think it's possible that those side effects aren't being deduplicated properly in this case, hence the multiple notifications. But that's just my hunch, I have to actually investigate.
Okay, yeah, that makes sense.
Had it happen again with a boost from the same user, but this time with only three notifications, which is interesting data.
Well it's a race condition I believe, so it makes sense that the results will differ.