mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 09:05:42 +03:00
Merge pull request #5792 from matrix-org/erikj/fix_bg_update
Fix current_state_events membership background update.
This commit is contained in:
commit
62a2d60d72
3 changed files with 2 additions and 1 deletions
1
changelog.d/5792.misc
Normal file
1
changelog.d/5792.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Reduce database IO usage by optimising queries for current membership.
|
|
@ -935,7 +935,7 @@ class RoomMemberStore(RoomMemberWorkerStore):
|
|||
while processed < batch_size:
|
||||
txn.execute(
|
||||
"""
|
||||
SELECT MIN(room_id) FROM rooms WHERE room_id > ?
|
||||
SELECT MIN(room_id) FROM current_state_events WHERE room_id > ?
|
||||
""",
|
||||
(last_processed_room,),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue