A single post is somehow creating multiple topics with no replies

The latest double topic creation issue is indeed a different thing. It’s a concurrency issue caused by the fact that we often get Announce > [Activity] -> Note and Announce > Note for the same Note within miliseconds of each other. They seem to both come from NodeBB itself (@devnull?). Here’s the first 6 POSTs we received, in order, for the example @trwnh linked above

Time Activity JSON
2025-02-02T22:31:52.795Z received_1.json (4.8 KB)
2025-02-02T22:31:53.027Z received_2.json (4.2 KB)
2025-02-02T22:35:41.690Z received_3.json (4.3 KB)
2025-02-02T22:35:42.089Z received_4.json (4.6 KB)
2025-02-02T22:36:14.104Z received_5.json (4.3 KB)
2025-02-02T22:36:17.181Z received_6.json (4.7 KB)

Note that the json is timestamped and logged immediately upon receipt, before any processing is applied. @silverpill I suspect this is the same concurrency issue you’ve been highlighting.

In any event, I’ve wrapped our processing in a distributed mutex to handle any such issues. So this should hopefully not recur when this is merged and deployed

3 Likes

Thanks @angus, we do this for backwards compatibility purposes but I am not actually certain of its efficacy.

I need to test our announces against Mastodon and see whether they support Announce(Create(Note))

1 Like

I ended up removing the simple Announce(Object) and am just announcing the activity instead.

I can’t speak to the practical considerations of how Mastodon handles or doesn’t handle Announce(Create(Note)) but I can at least say that with this kind of activity, you are never actually sharing the Note itself, and the shares collection on the Note will be unmodified.

Oh I understand now. End users Announce Notes. 1b12 announces the create.

1b12 consumers would be wise to handle both cases.

In that case I’ll have to manually check whether Mastodon follows of NodeBB group actors are affected, since that’s a current use case.

1 Like

Probably also a good idea to check not just Mastodon follows, but also Mastodon notifications. And in a future where Mastodon fleshes out the shares collection a little more, that would be a third consideration (does it get added to that collection)

Just a note that I just deployed this fix, so please report any new instances of this issue going forward.

3 Likes