Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6d9e2fd

Browse files
authored
Speed up background jobs populate_full_user_id_user_filters and populate_full_user_id_profiles (#15700)
1 parent 11e15d7 commit 6d9e2fd

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Diff for: changelog.d/15700.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Speed up background jobs `populate_full_user_id_user_filters` and `populate_full_user_id_profiles`.

Diff for: synapse/storage/databases/main/filtering.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _get_last_id(txn: LoggingTransaction) -> Optional[str]:
7171
SELECT user_id FROM user_filters
7272
WHERE user_id > ?
7373
ORDER BY user_id
74-
LIMIT 1 OFFSET 50
74+
LIMIT 1 OFFSET 1000
7575
"""
7676
txn.execute(sql, (lower_bound_id,))
7777
res = txn.fetchone()

Diff for: synapse/storage/databases/main/profile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _get_last_id(txn: LoggingTransaction) -> Optional[str]:
6565
SELECT user_id FROM profiles
6666
WHERE user_id > ?
6767
ORDER BY user_id
68-
LIMIT 1 OFFSET 50
68+
LIMIT 1 OFFSET 1000
6969
"""
7070
txn.execute(sql, (lower_bound_id,))
7171
res = txn.fetchone()

0 commit comments

Comments
 (0)