Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Faster joins: Update user directory once state re-sync completes #12815

Closed
1 task
Tracked by #14030
squahtx opened this issue May 20, 2022 · 3 comments · Fixed by matrix-org/complement#587 or #14874
Closed
1 task
Tracked by #14030

Faster joins: Update user directory once state re-sync completes #12815

squahtx opened this issue May 20, 2022 · 3 comments · Fixed by matrix-org/complement#587 or #14874
Assignees
Labels
A-Federated-Join joins over federation generally suck T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@squahtx
Copy link
Contributor

squahtx commented May 20, 2022


Potentially useful / possible blockers:

@babolivier babolivier added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label May 20, 2022
@MadLittleMods MadLittleMods added the A-Federated-Join joins over federation generally suck label Jun 3, 2022
@richvdh
Copy link
Member

richvdh commented Jun 9, 2022

Also: what does the directory say during re-sync, and is that ok?

@richvdh
Copy link
Member

richvdh commented Jun 9, 2022

Particular points of note:

  • if success:
    logger.info("State resync complete for %s", room_id)
    self._storage_controllers.state.notify_room_un_partial_stated(
    room_id
    )
    # TODO(faster_joins) update room stats and user directory?
    # https://github.com/matrix-org/synapse/issues/12814
    # https://github.com/matrix-org/synapse/issues/12815
    return
  • # FIXME(faster_joins): what do we do here?
    # https://github.com/matrix-org/synapse/issues/12814
    # https://github.com/matrix-org/synapse/issues/12815
    # https://github.com/matrix-org/synapse/issues/13008
    return await self.stores.main.get_partial_current_state_deltas(
    prev_stream_id, max_stream_id
    )

squahtx pushed a commit that referenced this issue Jan 19, 2023
When finishing a partial state join to a room, we update the current
state of the room without persisting additional events. Workers receive
notice of the current state update over replication, but neglect to wake
the room stats and user directory updaters, which then get incidentally
triggered the next time an event is persisted or an unrelated event
persister sends out a stream position update.

We wake the room stats and user directory updaters at the appropriate
time in this commit.

Part of #12814 and #12815.

Signed-off-by: Sean Quah <[email protected]>
squahtx pushed a commit that referenced this issue Jan 19, 2023
When finishing a partial state join to a room, we update the current
state of the room without persisting additional events. Workers receive
notice of the current state update over replication, but neglect to wake
the room stats and user directory updaters, which then get incidentally
triggered the next time an event is persisted or an unrelated event
persister sends out a stream position update.

We wake the room stats and user directory updaters at the appropriate
time in this commit.

Part of #12814 and #12815.

Signed-off-by: Sean Quah <[email protected]>
squahtx pushed a commit that referenced this issue Jan 19, 2023
When finishing a partial state join to a room, we update the current
state of the room without persisting additional events. Workers receive
notice of the current state update over replication, but neglect to wake
the room stats and user directory updaters, which then get incidentally
triggered the next time an event is persisted or an unrelated event
persister sends out a stream position update.

We wake the room stats and user directory updaters at the appropriate
time in this commit.

Part of #12814 and #12815.

Signed-off-by: Sean Quah <[email protected]>
@squahtx
Copy link
Contributor Author

squahtx commented Jan 19, 2023

Also: what does the directory say during re-sync, and is that ok?

During re-sync, the user directory reflects the current state of the room and excludes all remote users except new joiners.

DMRobertson pushed a commit that referenced this issue Jan 23, 2023
…n finishing join (#14874)

* Faster joins: Update room stats and user directory on workers when done

When finishing a partial state join to a room, we update the current
state of the room without persisting additional events. Workers receive
notice of the current state update over replication, but neglect to wake
the room stats and user directory updaters, which then get incidentally
triggered the next time an event is persisted or an unrelated event
persister sends out a stream position update.

We wake the room stats and user directory updaters at the appropriate
time in this commit.

Part of #12814 and #12815.

Signed-off-by: Sean Quah <[email protected]>

* fixup comment

Signed-off-by: Sean Quah <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federated-Join joins over federation generally suck T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
5 participants