mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Bound find_next_generated_user_id DB query.
We can easily bound the set of user IDs we pull out of the DB, so lets do that.
This commit is contained in:
parent
ecd254bc49
commit
d69fd53f74
@ -493,7 +493,9 @@ class RegistrationWorkerStore(SQLBaseStore):
|
||||
"""
|
||||
|
||||
def _find_next_generated_user_id(txn):
|
||||
txn.execute("SELECT name FROM users")
|
||||
# We bound between '@1' and '@a' to avoid pulling the entire table
|
||||
# out.
|
||||
txn.execute("SELECT name FROM users WHERE '@1' <= name AND name < '@a'")
|
||||
|
||||
regex = re.compile(r"^@(\d+):")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user