Skip to content

Commit 7f5d753

Browse files
authored
Re-run rejected metadata background update. (matrix-org#9503)
It landed in schema version 58 after 59 had been created, causing some servers to not run it. The main effect of was that not all rooms had their chain cover calculated correctly. After the BG updates complete the chain covers will get fixed when a new state event in the affected rooms is received.
1 parent 16108c5 commit 7f5d753

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

changelog.d/9503.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix missing chain cover index due to a schema delta not being applied correctly. Only affected servers that ran development versions.

synapse/storage/databases/main/schema/delta/58/28rejected_events_metadata.sql renamed to synapse/storage/databases/main/schema/delta/59/09rejected_events_metadata.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,14 @@
1313
* limitations under the License.
1414
*/
1515

16+
-- This originally was in 58/, but landed after 59/ was created, and so some
17+
-- servers running develop didn't run this delta. Running it again should be
18+
-- safe.
19+
--
20+
-- We first delete any in progress `rejected_events_metadata` background update,
21+
-- to ensure that we don't conflict when trying to insert the new one. (We could
22+
-- alternatively do an ON CONFLICT DO NOTHING, but that syntax isn't supported
23+
-- by older SQLite versions. Plus, this should be a rare case).
24+
DELETE FROM background_updates WHERE update_name = 'rejected_events_metadata';
1625
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
1726
(5828, 'rejected_events_metadata', '{}');

0 commit comments

Comments
 (0)