… which server sends when two peer instance end-users reply in comments to each other and neither is on the home server?

lemmy.ml is home to this community !lemmyfederation@lemmy.ml - if a user on midwest.social comments, which server does the distribution to all the servers subscribed to the community?

If you can point to Rust code in the projects where this happens, please do!

  • RoundSparrow@lemmy.mlOPM
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Question: What does Lemmy do with comments to a posting where the posting federation is delayed?

    What if serverB is down while serverA has a user on it that creates a new posting in a federated community. serverA is in a queue retry state of sending the posting to serverB. But what if the serverB comes online and a new comment is added on serverA before serverB ever received the posting (which is still in a delivery queue waiting for retry).

    Events in numbered sequence:

    1. serverB goes offline. It was subscribed to serverA community.
    2. user on serverA creates a new post “I like the new version of Lemmy”.
    3. serverA fails to connect to serverB in outbound federation queue, goes into sleep state between retries to serverB.
    4. serverB is now back online.
    5. user on serverA creates a new comment.
    6. serverA connects to serverB in outbound federation to deliver comment.

     

    But at this point, serverB is receiving a comment that it does not have a posting for. Does it accept it, and put it in the PostgreSQL database, or reject the federation?