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

Add index to local_group_updates.stream_id #11231

Merged
merged 6 commits into from
Nov 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Review comments
erikjohnston committed Nov 2, 2021
commit c6ee71a48c2b90715f8678e8596bff2913befa9b
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/group_server.py
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ def __init__(self, database: DatabasePool, db_conn: Connection, hs: "HomeServer"
update_name="local_group_updates_index",
index_name="local_group_updates_stream_id_index",
table="local_group_updates",
columns=("stream_id"),
columns=("stream_id",),
unique=True,
)
super().__init__(database, db_conn, hs)
Original file line number Diff line number Diff line change
@@ -13,6 +13,6 @@
* limitations under the License.
*/

-- Check old events for thread relations.
-- Check index on `local_group_updates.stream_id`.
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
(6503, 'local_group_updates_index', '{}');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like someone else sniped us and took 6503:

INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
(6503, 'remove_hidden_devices_from_device_inbox', '{}');

Bump to 6504? 😇

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really matter, but sure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! I suppose it doesn't matter as this query doesn't rely on being after remove_hidden_devices_from_device_inbox for any reason, correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, exactly!