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

Fix a stale comment in get_room_version_id_txn. #12969

Merged
merged 2 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/12969.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix an inaccurate comment.
7 changes: 1 addition & 6 deletions synapse/storage/databases/main/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,8 @@ def get_room_version_id_txn(self, txn: LoggingTransaction, room_id: str) -> str:
NotFoundError: if the room is unknown
"""

# First we try looking up room version from the database, but for old
# rooms we might not have added the room version to it yet so we fall
# back to previous behaviour and look in current state events.
#
# We really should have an entry in the rooms table for every room we
# care about, but let's be a bit paranoid (at least while the background
# update is happening) to avoid breaking existing rooms.
# care about, but let's be a bit paranoid.
room_version = self.db_pool.simple_select_one_onecol_txn(
txn,
table="rooms",
Expand Down