mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Select distinct devices from DB
Otherwise we might pull out tonnes of duplicate user_ids and this can make synapse sad.
This commit is contained in:
parent
82f7f1543b
commit
ac5491f563
@ -508,7 +508,7 @@ class DeviceStore(SQLBaseStore):
|
|||||||
defer.returnValue(set(changed))
|
defer.returnValue(set(changed))
|
||||||
|
|
||||||
sql = """
|
sql = """
|
||||||
SELECT user_id FROM device_lists_stream WHERE stream_id > ?
|
SELECT DISTINCT user_id FROM device_lists_stream WHERE stream_id > ?
|
||||||
"""
|
"""
|
||||||
rows = yield self._execute("get_user_whose_devices_changed", None, sql, from_key)
|
rows = yield self._execute("get_user_whose_devices_changed", None, sql, from_key)
|
||||||
defer.returnValue(set(row[0] for row in rows))
|
defer.returnValue(set(row[0] for row in rows))
|
||||||
|
Loading…
Reference in New Issue
Block a user