Replies of users from instances part of a joined relay don't appear in the notifications inbox half of the times #382

Closed
opened 2023-05-15 09:40:17 +00:00 by vib · 3 comments
Contributor

Steps to reproduce:

  1. Join a relay from Control Panel>Relays and get accepted
    (in my case I joined someone's relay hosted by this https://git.pleroma.social/pleroma/relay)
  2. Let users of other instances part of the relay reply to your posts
  3. Notice some if not most of them don't appear in the Notifications tab, but show up fine in places like the Home timeline.

I'm not sure of the whys and whats..
But I noticed that one reply that did show up in notifications didn't show yet the post has one renote (as consequence of the instance being relayed). So maybe in this case kind of the reply was received first and then the relay boosted the note? I don't know the inner workings of this but maybe this detail may point somewhere.

There's a chance the missing notifications are not related to being in a relay but I can't think of something else.

Steps to reproduce: 1. Join a relay from Control Panel>Relays and get accepted (in my case I joined someone's relay hosted by this https://git.pleroma.social/pleroma/relay) 2. Let users of other instances part of the relay reply to your posts 3. Notice some if not most of them don't appear in the Notifications tab, but show up fine in places like the Home timeline. I'm not sure of the whys and whats.. But I noticed that one reply that did show up in notifications didn't show yet the post has one renote (as consequence of the instance being relayed). So maybe in this case kind of the reply was received first and then the relay boosted the note? I don't know the inner workings of this but maybe this detail may point somewhere. There's a chance the missing notifications are not related to being in a relay but I can't think of something else.
vib changed title from Replies of users from instances part of a joined relay don't appear in the notifications inbox at least half of the times to Replies of users from instances part of a joined relay don't appear in the notifications inbox half of the times 2023-05-15 09:41:31 +00:00
Owner

But I noticed that one reply that did show up in notifications didn't show yet the post has one renote [...].

Something that did show up did now show up? I'm confused.

If a note shows up in an indirect way (e.g. by a renote) this will not trigger notifications. The assumption is that if someone wanted to interact with you directly, they should have sent the message to you directly as well (and not through a relay).

So maybe in this case kind of the reply was received first and then the relay boosted the note?

If the "relaying" part is basically renoting everything, the problem may arise according to what I said before if the relay is faster with sending the Announce activity than the original server is with sending the Create activity. Imagine this sequence of events

  1. User A creates the note replying to User B
  2. A's server sends the note to the relay
  3. The relay delivers an Announce of the note to B's server immediately
  4. B's server receives the Announce and does not trigger notifications (see above)
  5. A's server delivers the note to B's server
  6. B's server has already fetched the note and therefore does not trigger notifications

Now I of course don't know if that is what happening. I gathered from your description of the problem that it is intermittent, so maybe the network and/or processing speed of the original server is slightly worse than the relay in which case it could sometimes happen that it is faster than the original server.

I don't think there is really a good solution to this.

  • Doing it on Foundkey side would probably require adding some very complicated heuristic on whether notifications should be triggered e.g. in step 6 from above somehow.
  • Doing it on the relay side would probably require adding some kind of timer to the relay before it starts relaying stuff.
  • Doing it on the sending side would mean to somehow ensure to deliver to relays last? But not sure if that is even possible, since it would require to identify something as a Relay and I don't see an obvious way to do that.
> But I noticed that one reply that did show up in notifications didn't show yet the post has one renote [...]. Something that did show up did now show up? I'm confused. If a note shows up in an indirect way (e.g. by a renote) this will not trigger notifications. The assumption is that if someone wanted to interact with you directly, they should have sent the message to you directly as well (and not through a relay). > So maybe in this case kind of the reply was received first and then the relay boosted the note? If the "relaying" part is basically renoting everything, the problem may arise according to what I said before if the relay is faster with sending the Announce activity than the original server is with sending the Create activity. Imagine this sequence of events 1. User A creates the note replying to User B 2. A's server sends the note to the relay 3. The relay delivers an `Announce` of the note to B's server immediately 4. B's server receives the `Announce` and does not trigger notifications (see above) 5. A's server delivers the note to B's server 6. B's server has already fetched the note and therefore does not trigger notifications Now I of course don't know if that is what happening. I gathered from your description of the problem that it is intermittent, so maybe the network and/or processing speed of the original server is slightly worse than the relay in which case it could sometimes happen that it is faster than the original server. I don't think there is really a good solution to this. - Doing it on Foundkey side would probably require adding some very complicated heuristic on whether notifications should be triggered e.g. in step 6 from above somehow. - Doing it on the relay side would probably require adding some kind of timer to the relay before it starts relaying stuff. - Doing it on the sending side would mean to somehow ensure to deliver to relays last? But not sure if that is even possible, since it would require to identify something as a Relay and I don't see an obvious way to do that.
Author
Contributor

Sorry for my confusing phrasing.. I don't know what I did there. What I meant was that I noticed the following happened:
A notification for a reply did appear; I looked at the timeline where obviously the post showed up too, the usual 1 renote from the relay was missing (until a page refresh of course). Otherwise when this bug occurs and replies don't show up in notifications, when looking at the timeline, the respective reply already has 1 renote.
But it seems you figured where I was getting to, I was suspecting something similar to the steps you described.

Anyway,

I don't think there is really a good solution to this.

I see.. I wrote here in hoping there could be a reasonable fix on FoundKey's side.

It's kind of a bummer, but I am not surprised considering I heard many others say relays were problematic for them.

Sorry for my confusing phrasing.. I don't know what I did there. What I meant was that I noticed the following happened: A notification for a reply did appear; I looked at the timeline where obviously the post showed up too, the usual 1 renote from the relay was missing (until a page refresh of course). Otherwise when this bug occurs and replies don't show up in notifications, when looking at the timeline, the respective reply already has 1 renote. But it seems you figured where I was getting to, I was suspecting something similar to the steps you described. Anyway, > I don't think there is really a good solution to this. I see.. I wrote here in hoping there could be a reasonable fix on FoundKey's side. It's kind of a bummer, but I am not surprised considering I heard many others say relays were problematic for them.
Owner

closing as wontfix

closing as wontfix
Sign in to join this conversation.
No labels
feature
fix
upkeep
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#382
No description provided.