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

Commit

Permalink
TODO(faster joins -> TODO(faster_joins
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Nov 25, 2022
1 parent a998a36 commit 20189a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion synapse/handlers/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ async def incoming_device_list_update(
# Check if we are partially joining any rooms. If so we need to store
# all device list updates so that we can handle them correctly once we
# know who is in the room.
# TODO(faster joins): this fetches and processes a bunch of data that we don't
# TODO(faster_joins): this fetches and processes a bunch of data that we don't
# use. Could be replaced by a tighter query e.g.
# SELECT EXISTS(SELECT 1 FROM partial_state_rooms)
partial_rooms = await self.store.get_partial_state_room_resync_info()
Expand Down
2 changes: 1 addition & 1 deletion synapse/replication/tcp/streams/partial_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, hs: "HomeServer"):
store = hs.get_datastores().main
super().__init__(
hs.get_instance_name(),
# TODO(faster joins, multiple writers): we need to account for instance names
# TODO(faster_joins, multiple writers): we need to account for instance names
current_token_without_instance(store.get_un_partial_stated_rooms_token),
store.get_un_partial_stated_rooms_from_stream,
)
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(
("un_partial_stated_room_stream", "instance_name", "stream_id")
],
sequence_name="un_partial_stated_room_stream_sequence",
# TODO(faster joins, multiple writers) Support multiple writers.
# TODO(faster_joins, multiple writers) Support multiple writers.
writers=["master"],
)
else:
Expand Down Expand Up @@ -1274,7 +1274,7 @@ async def get_join_event_id_and_device_lists_stream_id_for_partial_state(
return result["join_event_id"], result["device_lists_stream_id"]

def get_un_partial_stated_rooms_token(self) -> int:
# TODO(faster joins, multiple writers): This is inappropriate if there
# TODO(faster_joins, multiple writers): This is inappropriate if there
# are multiple writers because workers that don't write often will
# hold all readers up.
# (See `MultiWriterIdGenerator.get_persisted_upto_position` for an
Expand Down

0 comments on commit 20189a7

Please sign in to comment.