summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-03-28 10:00:31 +0100
committerGitHub <noreply@github.com>2018-03-28 10:00:31 +0100
commitf879127aaa41ff95bbd5c1501b6f11c8eb3373d3 (patch)
tree86827b229ba0de82bb1a082349ee547e779e9863 /synapse/storage
parentMerge pull request #3030 from matrix-org/erikj/no_ujson (diff)
parentAlso do check inside linearizer (diff)
downloadsynapse-f879127aaa41ff95bbd5c1501b6f11c8eb3373d3.tar.xz
Merge pull request #3029 from matrix-org/erikj/linearize_generate_user_id
Linearize calls to _generate_user_id
Diffstat (limited to 'synapse/storage')
-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)))