mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -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
|
-- add new index that includes method to local media
|
||||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||||
('local_media_repository_thumbnails_method_idx', '{}');
|
(5807, 'local_media_repository_thumbnails_method_idx', '{}');
|
||||||
|
|
||||||
-- add new index that includes method to remote media
|
-- add new index that includes method to remote media
|
||||||
INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
|
INSERT INTO background_updates (ordering, update_name, progress_json, depends_on) VALUES
|
||||||
('remote_media_repository_thumbnails_method_idx', '{}', 'local_media_repository_thumbnails_method_idx');
|
(5807, 'remote_media_repository_thumbnails_method_idx', '{}', 'local_media_repository_thumbnails_method_idx');
|
||||||
|
|
||||||
-- drop old index
|
-- drop old index
|
||||||
INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
|
INSERT INTO background_updates (ordering, update_name, progress_json, depends_on) VALUES
|
||||||
('media_repository_drop_index_wo_method', '{}', 'remote_media_repository_thumbnails_method_idx');
|
(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
|
-- functionality as the old one. This effectively restarts the background job
|
||||||
-- from the beginning, without running it twice in a row, supporting both
|
-- from the beginning, without running it twice in a row, supporting both
|
||||||
-- upgrade usecases.
|
-- upgrade usecases.
|
||||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||||
('populate_stats_process_rooms_2', '{}');
|
(5812, 'populate_stats_process_rooms_2', '{}');
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||||
('users_have_local_media', '{}');
|
(5822, 'users_have_local_media', '{}');
|
||||||
|
@ -13,5 +13,5 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INSERT INTO background_updates (update_name, progress_json) VALUES
|
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
|
||||||
('e2e_cross_signing_keys_idx', '{}');
|
(5823, 'e2e_cross_signing_keys_idx', '{}');
|
||||||
|
Loading…
Reference in New Issue
Block a user