diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-05-05 18:14:00 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-05-05 18:14:00 +0100 |
commit | 13dd458b8ddb248a84f5cf0c063e6002c831d72a (patch) | |
tree | c29b804da054820a6c0ed1d59d0159e620862093 /synapse/storage | |
parent | Update changelog.d/7423.misc (diff) | |
parent | Add backwards compatibility codepath to LoggingContext. (#7408) (diff) | |
download | synapse-13dd458b8ddb248a84f5cf0c063e6002c831d72a.tar.xz |
Merge branch 'release-v1.13.0' into erikj/faster_device_lists_fetch
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/data_stores/main/registration.py | 5 | ||||
-rw-r--r-- | synapse/storage/data_stores/main/schema/delta/56/stats_separated.sql | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/synapse/storage/data_stores/main/registration.py b/synapse/storage/data_stores/main/registration.py index 3e53c8568a..efcdd2100b 100644 --- a/synapse/storage/data_stores/main/registration.py +++ b/synapse/storage/data_stores/main/registration.py @@ -273,8 +273,7 @@ class RegistrationWorkerStore(SQLBaseStore): desc="delete_account_validity_for_user", ) - @defer.inlineCallbacks - def is_server_admin(self, user): + async def is_server_admin(self, user): """Determines if a user is an admin of this homeserver. Args: @@ -283,7 +282,7 @@ class RegistrationWorkerStore(SQLBaseStore): Returns (bool): true iff the user is a server admin, false otherwise. """ - res = yield self.db.simple_select_one_onecol( + res = await self.db.simple_select_one_onecol( table="users", keyvalues={"name": user.to_string()}, retcol="admin", diff --git a/synapse/storage/data_stores/main/schema/delta/56/stats_separated.sql b/synapse/storage/data_stores/main/schema/delta/56/stats_separated.sql index 163529c071..bbdde121e8 100644 --- a/synapse/storage/data_stores/main/schema/delta/56/stats_separated.sql +++ b/synapse/storage/data_stores/main/schema/delta/56/stats_separated.sql @@ -35,9 +35,13 @@ DELETE FROM background_updates WHERE update_name IN ( 'populate_stats_cleanup' ); +-- this relies on current_state_events.membership having been populated, so add +-- a dependency on current_state_events_membership. INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES - ('populate_stats_process_rooms', '{}', ''); + ('populate_stats_process_rooms', '{}', 'current_state_events_membership'); +-- this also relies on current_state_events.membership having been populated, but +-- we get that as a side-effect of depending on populate_stats_process_rooms. INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES ('populate_stats_process_users', '{}', 'populate_stats_process_rooms'); |