From 307007f082ce59635f378672b0d6f4e4e9d15984 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 9 Aug 2021 23:13:20 +0100 Subject: [PATCH 01/11] Remove the unused public_room_list_stream Modifications to this stream were only possible on the main process, which had the knock-on effect of other tasks, mainly creating a room, only being possible on the main process as well. Instead of rearchitecting this stream to allow multiple writers though, we can actually just remove it entirely - it's not used. --- synapse/replication/slave/storage/room.py | 11 --- synapse/replication/tcp/streams/__init__.py | 3 - synapse/replication/tcp/streams/_base.py | 25 ------ synapse/storage/databases/main/__init__.py | 4 +- synapse/storage/databases/main/room.py | 99 ++------------------- 5 files changed, 10 insertions(+), 132 deletions(-) diff --git a/synapse/replication/slave/storage/room.py b/synapse/replication/slave/storage/room.py index 8cc6de3f4698..2469bbcf094a 100644 --- a/synapse/replication/slave/storage/room.py +++ b/synapse/replication/slave/storage/room.py @@ -12,26 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.replication.tcp.streams import PublicRoomsStream from synapse.storage.database import DatabasePool from synapse.storage.databases.main.room import RoomWorkerStore from ._base import BaseSlavedStore -from ._slaved_id_tracker import SlavedIdTracker class RoomStore(RoomWorkerStore, BaseSlavedStore): def __init__(self, database: DatabasePool, db_conn, hs): super().__init__(database, db_conn, hs) - self._public_room_id_gen = SlavedIdTracker( - db_conn, "public_room_list_stream", "stream_id" - ) - - def get_current_public_room_stream_id(self): - return self._public_room_id_gen.get_current_token() def process_replication_rows(self, stream_name, instance_name, token, rows): - if stream_name == PublicRoomsStream.NAME: - self._public_room_id_gen.advance(instance_name, token) - return super().process_replication_rows(stream_name, instance_name, token, rows) diff --git a/synapse/replication/tcp/streams/__init__.py b/synapse/replication/tcp/streams/__init__.py index 4c0023c68aee..f41eabd85e58 100644 --- a/synapse/replication/tcp/streams/__init__.py +++ b/synapse/replication/tcp/streams/__init__.py @@ -32,7 +32,6 @@ GroupServerStream, PresenceFederationStream, PresenceStream, - PublicRoomsStream, PushersStream, PushRulesStream, ReceiptsStream, @@ -57,7 +56,6 @@ PushRulesStream, PushersStream, CachesStream, - PublicRoomsStream, DeviceListsStream, ToDeviceStream, FederationStream, @@ -79,7 +77,6 @@ "PushRulesStream", "PushersStream", "CachesStream", - "PublicRoomsStream", "DeviceListsStream", "ToDeviceStream", "TagAccountDataStream", diff --git a/synapse/replication/tcp/streams/_base.py b/synapse/replication/tcp/streams/_base.py index 3716c41bea7b..9b905aba9dbb 100644 --- a/synapse/replication/tcp/streams/_base.py +++ b/synapse/replication/tcp/streams/_base.py @@ -447,31 +447,6 @@ def __init__(self, hs): ) -class PublicRoomsStream(Stream): - """The public rooms list changed""" - - PublicRoomsStreamRow = namedtuple( - "PublicRoomsStreamRow", - ( - "room_id", # str - "visibility", # str - "appservice_id", # str, optional - "network_id", # str, optional - ), - ) - - NAME = "public_rooms" - ROW_TYPE = PublicRoomsStreamRow - - def __init__(self, hs): - store = hs.get_datastore() - super().__init__( - hs.get_instance_name(), - current_token_without_instance(store.get_current_public_room_stream_id), - store.get_all_new_public_rooms, - ) - - class DeviceListsStream(Stream): """Either a user has updated their devices or a remote server needs to be told about a device update. diff --git a/synapse/storage/databases/main/__init__.py b/synapse/storage/databases/main/__init__.py index 8d9f07111db5..01b918e12e10 100644 --- a/synapse/storage/databases/main/__init__.py +++ b/synapse/storage/databases/main/__init__.py @@ -127,9 +127,6 @@ def __init__(self, database: DatabasePool, db_conn, hs): self._clock = hs.get_clock() self.database_engine = database.engine - self._public_room_id_gen = StreamIdGenerator( - db_conn, "public_room_list_stream", "stream_id" - ) self._device_list_id_gen = StreamIdGenerator( db_conn, "device_lists_stream", @@ -170,6 +167,7 @@ def __init__(self, database: DatabasePool, db_conn, hs): sequence_name="cache_invalidation_stream_seq", writers=[], ) + else: self._cache_id_gen = None diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index 443e5f331545..04c149e6e8a4 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -1411,7 +1411,7 @@ async def store_room( """ try: - def store_room_txn(txn, next_id): + def store_room_txn(txn): self.db_pool.simple_insert_txn( txn, "rooms", @@ -1423,21 +1423,8 @@ def store_room_txn(txn, next_id): "has_auth_chain_index": True, }, ) - if is_public: - self.db_pool.simple_insert_txn( - txn, - table="public_room_list_stream", - values={ - "stream_id": next_id, - "room_id": room_id, - "visibility": is_public, - }, - ) - async with self._public_room_id_gen.get_next() as next_id: - await self.db_pool.runInteraction( - "store_room_txn", store_room_txn, next_id - ) + await self.db_pool.runInteraction("store_room_txn", store_room_txn) except Exception as e: logger.error("store_room with room_id=%s failed: %s", room_id, e) raise StoreError(500, "Problem creating room.") @@ -1471,7 +1458,7 @@ async def maybe_store_room_on_outlier_membership( ) async def set_room_is_public(self, room_id, is_public): - def set_room_is_public_txn(txn, next_id): + def set_room_is_public_txn(txn): self.db_pool.simple_update_one_txn( txn, table="rooms", @@ -1479,40 +1466,7 @@ def set_room_is_public_txn(txn, next_id): updatevalues={"is_public": is_public}, ) - entries = self.db_pool.simple_select_list_txn( - txn, - table="public_room_list_stream", - keyvalues={ - "room_id": room_id, - "appservice_id": None, - "network_id": None, - }, - retcols=("stream_id", "visibility"), - ) - - entries.sort(key=lambda r: r["stream_id"]) - - add_to_stream = True - if entries: - add_to_stream = bool(entries[-1]["visibility"]) != is_public - - if add_to_stream: - self.db_pool.simple_insert_txn( - txn, - table="public_room_list_stream", - values={ - "stream_id": next_id, - "room_id": room_id, - "visibility": is_public, - "appservice_id": None, - "network_id": None, - }, - ) - - async with self._public_room_id_gen.get_next() as next_id: - await self.db_pool.runInteraction( - "set_room_is_public", set_room_is_public_txn, next_id - ) + await self.db_pool.runInteraction("set_room_is_public", set_room_is_public_txn) self.hs.get_notifier().on_new_replication_data() async def set_room_is_public_appservice( @@ -1533,7 +1487,7 @@ async def set_room_is_public_appservice( list. """ - def set_room_is_public_appservice_txn(txn, next_id): + def set_room_is_public_appservice_txn(txn): if is_public: try: self.db_pool.simple_insert_txn( @@ -1559,42 +1513,10 @@ def set_room_is_public_appservice_txn(txn, next_id): }, ) - entries = self.db_pool.simple_select_list_txn( - txn, - table="public_room_list_stream", - keyvalues={ - "room_id": room_id, - "appservice_id": appservice_id, - "network_id": network_id, - }, - retcols=("stream_id", "visibility"), - ) - - entries.sort(key=lambda r: r["stream_id"]) - - add_to_stream = True - if entries: - add_to_stream = bool(entries[-1]["visibility"]) != is_public - - if add_to_stream: - self.db_pool.simple_insert_txn( - txn, - table="public_room_list_stream", - values={ - "stream_id": next_id, - "room_id": room_id, - "visibility": is_public, - "appservice_id": appservice_id, - "network_id": network_id, - }, - ) - - async with self._public_room_id_gen.get_next() as next_id: - await self.db_pool.runInteraction( - "set_room_is_public_appservice", - set_room_is_public_appservice_txn, - next_id, - ) + await self.db_pool.runInteraction( + "set_room_is_public_appservice", + set_room_is_public_appservice_txn, + ) self.hs.get_notifier().on_new_replication_data() async def add_event_report( @@ -1787,9 +1709,6 @@ def _get_event_reports_paginate_txn(txn): "get_event_reports_paginate", _get_event_reports_paginate_txn ) - def get_current_public_room_stream_id(self): - return self._public_room_id_gen.get_current_token() - async def block_room(self, room_id: str, user_id: str) -> None: """Marks the room as blocked. Can be called multiple times. From 15bf3dabef7b21042c24e5230c41fa07205651e8 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 10 Aug 2021 00:32:19 +0100 Subject: [PATCH 02/11] Changelog --- changelog.d/10565.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/10565.misc diff --git a/changelog.d/10565.misc b/changelog.d/10565.misc new file mode 100644 index 000000000000..06796b61aba2 --- /dev/null +++ b/changelog.d/10565.misc @@ -0,0 +1 @@ +Remove the unused public rooms replication stream. \ No newline at end of file From 2cf6acb97c24de5242db6cd30e7b3b0f00dcf84e Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 10 Aug 2021 13:32:30 +0100 Subject: [PATCH 03/11] Remove get_all_new_public_rooms --- synapse/storage/databases/main/room.py | 49 -------------------------- 1 file changed, 49 deletions(-) diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index 04c149e6e8a4..4f5833d5fc36 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -890,55 +890,6 @@ def _quarantine_media_txn( return total_media_quarantined - async def get_all_new_public_rooms( - self, instance_name: str, last_id: int, current_id: int, limit: int - ) -> Tuple[List[Tuple[int, tuple]], int, bool]: - """Get updates for public rooms replication stream. - - Args: - instance_name: The writer we want to fetch updates from. Unused - here since there is only ever one writer. - last_id: The token to fetch updates from. Exclusive. - current_id: The token to fetch updates up to. Inclusive. - limit: The requested limit for the number of rows to return. The - function may return more or fewer rows. - - Returns: - A tuple consisting of: the updates, a token to use to fetch - subsequent updates, and whether we returned fewer rows than exists - between the requested tokens due to the limit. - - The token returned can be used in a subsequent call to this - function to get further updatees. - - The updates are a list of 2-tuples of stream ID and the row data - """ - if last_id == current_id: - return [], current_id, False - - def get_all_new_public_rooms(txn): - sql = """ - SELECT stream_id, room_id, visibility, appservice_id, network_id - FROM public_room_list_stream - WHERE stream_id > ? AND stream_id <= ? - ORDER BY stream_id ASC - LIMIT ? - """ - - txn.execute(sql, (last_id, current_id, limit)) - updates = [(row[0], row[1:]) for row in txn] - limited = False - upto_token = current_id - if len(updates) >= limit: - upto_token = updates[-1][0] - limited = True - - return updates, upto_token, limited - - return await self.db_pool.runInteraction( - "get_all_new_public_rooms", get_all_new_public_rooms - ) - async def get_rooms_for_retention_period_in_range( self, min_ms: Optional[int], max_ms: Optional[int], include_null: bool = False ) -> Dict[str, dict]: From 185f8fae13ccfbcf252d451b91a6a3d97f1a04f2 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 10 Aug 2021 13:35:48 +0100 Subject: [PATCH 04/11] Remove superfluous class methods from RoomStore --- synapse/replication/slave/storage/room.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/synapse/replication/slave/storage/room.py b/synapse/replication/slave/storage/room.py index 2469bbcf094a..960eea079eb4 100644 --- a/synapse/replication/slave/storage/room.py +++ b/synapse/replication/slave/storage/room.py @@ -1,4 +1,4 @@ -# Copyright 2015, 2016 OpenMarket Ltd +# Copyright 2015-2021 The Matrix.org Foundation C.I.C. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,15 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.storage.database import DatabasePool from synapse.storage.databases.main.room import RoomWorkerStore from ._base import BaseSlavedStore class RoomStore(RoomWorkerStore, BaseSlavedStore): - def __init__(self, database: DatabasePool, db_conn, hs): - super().__init__(database, db_conn, hs) + """This class is used to tie together worker storage methods + and those that can only be called from the main process. + """ - def process_replication_rows(self, stream_name, instance_name, token, rows): - return super().process_replication_rows(stream_name, instance_name, token, rows) + pass From aac90b53a10cf12613ce9c00199eda64382ac813 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 10 Aug 2021 13:42:32 +0100 Subject: [PATCH 05/11] pass on the pass --- synapse/replication/slave/storage/room.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/synapse/replication/slave/storage/room.py b/synapse/replication/slave/storage/room.py index 960eea079eb4..ded034e4ef70 100644 --- a/synapse/replication/slave/storage/room.py +++ b/synapse/replication/slave/storage/room.py @@ -21,5 +21,3 @@ class RoomStore(RoomWorkerStore, BaseSlavedStore): """This class is used to tie together worker storage methods and those that can only be called from the main process. """ - - pass From 1b332b73084897ead0e70ff074f59fb84466c47d Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 11 Aug 2021 10:49:03 +0100 Subject: [PATCH 06/11] Switch from 1 op transactions to simple_* methods --- synapse/storage/databases/main/room.py | 81 +++++++++++--------------- 1 file changed, 35 insertions(+), 46 deletions(-) diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index 4f5833d5fc36..cca2ca79b4c5 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -1361,21 +1361,17 @@ async def store_room( StoreError if the room could not be stored. """ try: - - def store_room_txn(txn): - self.db_pool.simple_insert_txn( - txn, - "rooms", - { - "room_id": room_id, - "creator": room_creator_user_id, - "is_public": is_public, - "room_version": room_version.identifier, - "has_auth_chain_index": True, - }, - ) - - await self.db_pool.runInteraction("store_room_txn", store_room_txn) + await self.db_pool.simple_insert( + "rooms", + { + "room_id": room_id, + "creator": room_creator_user_id, + "is_public": is_public, + "room_version": room_version.identifier, + "has_auth_chain_index": True, + }, + desc="store_room", + ) except Exception as e: logger.error("store_room with room_id=%s failed: %s", room_id, e) raise StoreError(500, "Problem creating room.") @@ -1409,15 +1405,13 @@ async def maybe_store_room_on_outlier_membership( ) async def set_room_is_public(self, room_id, is_public): - def set_room_is_public_txn(txn): - self.db_pool.simple_update_one_txn( - txn, - table="rooms", - keyvalues={"room_id": room_id}, - updatevalues={"is_public": is_public}, - ) + await self.db_pool.simple_update_one( + table="rooms", + keyvalues={"room_id": room_id}, + updatevalues={"is_public": is_public}, + desc="set_room_is_public", + ) - await self.db_pool.runInteraction("set_room_is_public", set_room_is_public_txn) self.hs.get_notifier().on_new_replication_data() async def set_room_is_public_appservice( @@ -1438,36 +1432,31 @@ async def set_room_is_public_appservice( list. """ - def set_room_is_public_appservice_txn(txn): - if is_public: - try: - self.db_pool.simple_insert_txn( - txn, - table="appservice_room_list", - values={ - "appservice_id": appservice_id, - "network_id": network_id, - "room_id": room_id, - }, - ) - except self.database_engine.module.IntegrityError: - # We've already inserted, nothing to do. - return - else: - self.db_pool.simple_delete_txn( - txn, + if is_public: + try: + await self.db_pool.simple_insert( table="appservice_room_list", - keyvalues={ + values={ "appservice_id": appservice_id, "network_id": network_id, "room_id": room_id, }, + desc="set_room_is_public_appservice_true", ) + except self.database_engine.module.IntegrityError: + # We've already inserted, nothing to do. + return + else: + await self.db_pool.simple_delete( + table="appservice_room_list", + keyvalues={ + "appservice_id": appservice_id, + "network_id": network_id, + "room_id": room_id, + }, + desc="set_room_is_public_appservice_false", + ) - await self.db_pool.runInteraction( - "set_room_is_public_appservice", - set_room_is_public_appservice_txn, - ) self.hs.get_notifier().on_new_replication_data() async def add_event_report( From 58b53f2c56579d7fa97bc4a4f794d1e501c0cb1d Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Mon, 16 Aug 2021 15:18:53 +0100 Subject: [PATCH 07/11] type fixes Co-authored-by: Patrick Cloke --- synapse/storage/databases/main/room.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index cca2ca79b4c5..8b7dcec87a6c 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -1404,7 +1404,7 @@ async def maybe_store_room_on_outlier_membership( lock=False, ) - async def set_room_is_public(self, room_id, is_public): + async def set_room_is_public(self, room_id: str, is_public: bool) -> None: await self.db_pool.simple_update_one( table="rooms", keyvalues={"room_id": room_id}, From 8cf01918ed269ee02264980f361e86bd390fe8d9 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 16 Aug 2021 16:27:23 +0100 Subject: [PATCH 08/11] Upsert instead of insert to avoid integrity errors --- synapse/storage/databases/main/room.py | 28 ++++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index 8b7dcec87a6c..c7a1c1e8d938 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -1433,19 +1433,21 @@ async def set_room_is_public_appservice( """ if is_public: - try: - await self.db_pool.simple_insert( - table="appservice_room_list", - values={ - "appservice_id": appservice_id, - "network_id": network_id, - "room_id": room_id, - }, - desc="set_room_is_public_appservice_true", - ) - except self.database_engine.module.IntegrityError: - # We've already inserted, nothing to do. - return + await self.db_pool.simple_upsert( + table="appservice_room_list", + keyvalues={ + "appservice_id": appservice_id, + "network_id": network_id, + "room_id": room_id, + }, + values={}, + insertion_values={ + "appservice_id": appservice_id, + "network_id": network_id, + "room_id": room_id, + }, + desc="set_room_is_public_appservice_true", + ) else: await self.db_pool.simple_delete( table="appservice_room_list", From 51424a2d3d8f8f81276083f1c7ead5b2561fcb9d Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 16 Aug 2021 17:12:13 +0100 Subject: [PATCH 09/11] Remove RoomStore replication class In favour of simply using RoomWorkerStore everywhere instead. --- synapse/app/admin_cmd.py | 2 -- synapse/app/generic_worker.py | 4 ++-- synapse/replication/slave/storage/room.py | 23 ----------------------- 3 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 synapse/replication/slave/storage/room.py diff --git a/synapse/app/admin_cmd.py b/synapse/app/admin_cmd.py index 3234d9ebba07..7396db93c62f 100644 --- a/synapse/app/admin_cmd.py +++ b/synapse/app/admin_cmd.py @@ -38,7 +38,6 @@ from synapse.replication.slave.storage.push_rule import SlavedPushRuleStore from synapse.replication.slave.storage.receipts import SlavedReceiptsStore from synapse.replication.slave.storage.registration import SlavedRegistrationStore -from synapse.replication.slave.storage.room import RoomStore from synapse.server import HomeServer from synapse.util.logcontext import LoggingContext from synapse.util.versionstring import get_version_string @@ -58,7 +57,6 @@ class AdminCmdSlavedStore( SlavedPushRuleStore, SlavedEventStore, SlavedClientIpStore, - RoomStore, BaseSlavedStore, ): pass diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index 3b7131af8fa2..6dd31839fd07 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -64,7 +64,6 @@ from synapse.replication.slave.storage.pushers import SlavedPusherStore from synapse.replication.slave.storage.receipts import SlavedReceiptsStore from synapse.replication.slave.storage.registration import SlavedRegistrationStore -from synapse.replication.slave.storage.room import RoomStore from synapse.rest.admin import register_servlets_for_media_repo from synapse.rest.client.v1 import events, login, presence, room from synapse.rest.client.v1.initial_sync import InitialSyncRestServlet @@ -114,6 +113,7 @@ MonthlyActiveUsersWorkerStore, ) from synapse.storage.databases.main.presence import PresenceStore +from synapse.storage.databases.main.room import RoomWorkerStore from synapse.storage.databases.main.search import SearchStore from synapse.storage.databases.main.stats import StatsStore from synapse.storage.databases.main.transactions import TransactionWorkerStore @@ -237,7 +237,7 @@ class GenericWorkerSlavedStore( ClientIpWorkerStore, SlavedEventStore, SlavedKeyStore, - RoomStore, + RoomWorkerStore, DirectoryStore, SlavedApplicationServiceStore, SlavedRegistrationStore, diff --git a/synapse/replication/slave/storage/room.py b/synapse/replication/slave/storage/room.py deleted file mode 100644 index ded034e4ef70..000000000000 --- a/synapse/replication/slave/storage/room.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015-2021 The Matrix.org Foundation C.I.C. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from synapse.storage.databases.main.room import RoomWorkerStore - -from ._base import BaseSlavedStore - - -class RoomStore(RoomWorkerStore, BaseSlavedStore): - """This class is used to tie together worker storage methods - and those that can only be called from the main process. - """ From bcce12d3be6c98a99a802c870fe7e2a0c2065107 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 17 Aug 2021 11:06:25 +0100 Subject: [PATCH 10/11] Bump the database schema version to 63 In preparation for dropping public_room_list_stream and raising the schema compat version in a subsequent release. --- synapse/storage/schema/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/storage/schema/__init__.py b/synapse/storage/schema/__init__.py index fd4dd67d910a..ea39e5f8d111 100644 --- a/synapse/storage/schema/__init__.py +++ b/synapse/storage/schema/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -SCHEMA_VERSION = 62 +SCHEMA_VERSION = 63 """Represents the expectations made by the codebase about the database schema This should be incremented whenever the codebase changes its requirements on the From 64cfb61b1411928c0b2bc4a1b574a6a6dca7665d Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 17 Aug 2021 11:15:00 +0100 Subject: [PATCH 11/11] Add some context to the schema version bump --- synapse/storage/schema/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/storage/schema/__init__.py b/synapse/storage/schema/__init__.py index ea39e5f8d111..f0a8538743a6 100644 --- a/synapse/storage/schema/__init__.py +++ b/synapse/storage/schema/__init__.py @@ -25,6 +25,11 @@ Changes in SCHEMA_VERSION = 61: - The `user_stats_historical` and `room_stats_historical` tables are not written and are not read (previously, they were written but not read). + +Changes in SCHEMA_VERSION = 63: + - The `public_room_list_stream` table is not written nor read to + (previously, it was written and read to, but not for any significant purpose). + https://github.com/matrix-org/synapse/pull/10565 """