summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-11-28 09:33:41 +0000
committerAmber Brown <hawkowl@atleastfornow.net>2018-11-28 20:33:41 +1100
commitf9b136a8869ea9351fa109ac62b36303f4a1dc47 (patch)
tree489ce1f4605431ac8184c80f009d7d9aff8164ec /synapse/storage
parentSupport m.login.sso (#4220) (diff)
downloadsynapse-f9b136a8869ea9351fa109ac62b36303f4a1dc47.tar.xz
Neilj/fix mau initial reserved users (#4211)
* fix transaction wrapping bug that caused get_user_id_by_threepid_txn to fail

* towncrier

* white space
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/monthly_active_users.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/monthly_active_users.py b/synapse/storage/monthly_active_users.py
index c353b11c9a..479e01ddc1 100644
--- a/synapse/storage/monthly_active_users.py
+++ b/synapse/storage/monthly_active_users.py
@@ -34,8 +34,9 @@ class MonthlyActiveUsersStore(SQLBaseStore):
         self.hs = hs
         self.reserved_users = ()
         # Do not add more reserved users than the total allowable number
-        self._initialise_reserved_users(
-            dbconn.cursor(),
+        self._new_transaction(
+            dbconn, "initialise_mau_threepids", [], [],
+            self._initialise_reserved_users,
             hs.config.mau_limits_reserved_threepids[:self.hs.config.max_mau_value],
         )