mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Add missing ordering
to background updates (#8850)
It's important that we make sure our background updates happen in a defined order, to avoid disasters like #6923. Add an ordering to all of the background updates that have landed since #7190.
This commit is contained in:
parent
3f0cba657c
commit
9edff901d1
1
changelog.d/8850.misc
Normal file
1
changelog.d/8850.misc
Normal file
@ -0,0 +1 @@
|
||||
Add missing `ordering` to background database updates.
|
@ -20,14 +20,14 @@
|
||||
*/
|
||||
|
||||
-- add new index that includes method to local media
|
||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
||||
('local_media_repository_thumbnails_method_idx', '{}');
|
||||
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||
(5807, 'local_media_repository_thumbnails_method_idx', '{}');
|
||||
|
||||
-- add new index that includes method to remote media
|
||||
INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
|
||||
('remote_media_repository_thumbnails_method_idx', '{}', 'local_media_repository_thumbnails_method_idx');
|
||||
INSERT INTO background_updates (ordering, update_name, progress_json, depends_on) VALUES
|
||||
(5807, 'remote_media_repository_thumbnails_method_idx', '{}', 'local_media_repository_thumbnails_method_idx');
|
||||
|
||||
-- drop old index
|
||||
INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
|
||||
('media_repository_drop_index_wo_method', '{}', 'remote_media_repository_thumbnails_method_idx');
|
||||
INSERT INTO background_updates (ordering, update_name, progress_json, depends_on) VALUES
|
||||
(5807, 'media_repository_drop_index_wo_method', '{}', 'remote_media_repository_thumbnails_method_idx');
|
||||
|
||||
|
@ -28,5 +28,5 @@
|
||||
-- functionality as the old one. This effectively restarts the background job
|
||||
-- from the beginning, without running it twice in a row, supporting both
|
||||
-- upgrade usecases.
|
||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
||||
('populate_stats_process_rooms_2', '{}');
|
||||
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||
(5812, 'populate_stats_process_rooms_2', '{}');
|
||||
|
@ -1,2 +1,2 @@
|
||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
||||
('users_have_local_media', '{}');
|
||||
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||
(5822, 'users_have_local_media', '{}');
|
||||
|
@ -13,5 +13,5 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
||||
('e2e_cross_signing_keys_idx', '{}');
|
||||
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||
(5823, 'e2e_cross_signing_keys_idx', '{}');
|
||||
|
Loading…
Reference in New Issue
Block a user