-
Notifications
You must be signed in to change notification settings - Fork 562
Fix two bugs in the flag_existing_quarantined_media background update
#19901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b6ab33f
16bce21
defef8d
5ed45d6
1c9879b
99b235f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix the `flag_existing_quarantined_media` background update skipping some quarantined remote media. Introduced in v1.152.0. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| -- | ||
| -- This file is licensed under the Affero General Public License (AGPL) version 3. | ||
| -- | ||
| -- Copyright (C) 2026 Element Creations Ltd | ||
| -- | ||
| -- This program is free software: you can redistribute it and/or modify | ||
| -- it under the terms of the GNU Affero General Public License as | ||
| -- published by the Free Software Foundation, either version 3 of the | ||
| -- License, or (at your option) any later version. | ||
| -- | ||
| -- See the GNU Affero General Public License for more details: | ||
| -- <https://www.gnu.org/licenses/agpl-3.0.html>. | ||
|
|
||
| -- The `flag_existing_quarantined_media` background update (added in 94/03) originally | ||
| -- shipped with a broken remote media query that skipped some already-quarantined remote | ||
| -- media. Now that it's fixed, re-run the update from scratch so any media missed on the | ||
| -- first run gets flagged. | ||
| -- | ||
| -- We delete any existing row first: on servers where the update already completed the row | ||
| -- was removed, and on servers where it's still pending/mid-run this clears the stale | ||
| -- progress so the re-insert below starts cleanly (and avoids a primary key collision). | ||
| DELETE FROM background_updates WHERE update_name = 'flag_existing_quarantined_media'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's a huge shame to lose so many months of progress, especially when we're still running the background update on matrix.org. Can we update the job to run after the existing one or otherwise de-duplicate data going into the table?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is at odds with what you wrote above. Why do you care?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On matrix.org we can manually set to
I think we care about local media, but not about remote media, maybe?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Matrix.org's scale is very different than other servers. We do indeed care about local media a lot more than remote media on matrix.org |
||
|
|
||
| INSERT INTO background_updates (ordering, update_name, progress_json) VALUES | ||
| (9405, 'flag_existing_quarantined_media', '{}'); | ||
Uh oh!
There was an error while loading. Please reload this page.