summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-03-26 12:02:44 +0100
committerErik Johnston <erik@matrix.org>2018-03-26 12:02:44 +0100
commit8d6dc106d188308f687db1f696cad7ad1b9ae83d (patch)
tree019e8e78c9421fa700f7807c3b4c9bbe68e4cb61
parentLinearize calls to _generate_user_id (diff)
downloadsynapse-8d6dc106d188308f687db1f696cad7ad1b9ae83d.tar.xz
Don't use _cursor_to_dict in find_next_generated_user_id_localpart
-rw-r--r--synapse/storage/registration.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index d809b2ba46..6b557ca0cf 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -460,14 +460,12 @@ class RegistrationStore(RegistrationWorkerStore,
         """
         def _find_next_generated_user_id(txn):
             txn.execute("SELECT name FROM users")
-            rows = self.cursor_to_dict(txn)
 
             regex = re.compile("^@(\d+):")
 
             found = set()
 
-            for r in rows:
-                user_id = r["name"]
+            for user_id, in txn:
                 match = regex.search(user_id)
                 if match:
                     found.add(int(match.group(1)))