diff options
author | Erik Johnston <erik@matrix.org> | 2018-03-26 12:02:44 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-03-26 12:02:44 +0100 |
commit | 8d6dc106d188308f687db1f696cad7ad1b9ae83d (patch) | |
tree | 019e8e78c9421fa700f7807c3b4c9bbe68e4cb61 | |
parent | Linearize calls to _generate_user_id (diff) | |
download | synapse-8d6dc106d188308f687db1f696cad7ad1b9ae83d.tar.xz |
Don't use _cursor_to_dict in find_next_generated_user_id_localpart
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/registration.py | 4 |
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))) |