-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Replace register_noop_background_update
with DELETE
deltas
#12940
Comments
register_noop_background_update
with DELETE
deltas
AHA, I think I remember why we didn't do this as a delta: there have been times where we've told people to manually insert data into Not sure how much we care about that though. |
Have we ever done this for anything other than |
Not sure, probably not? I think we should probably still do this change, but we should remember that after this change its no longer safe to just blindly tell people to insert stuff back into |
The only use I found that might refer to that while putting together #12954 was: synapse/synapse/storage/databases/main/stats.py Lines 123 to 127 in 3c8f129
Those don't seem to be in the docs anymore though, so... |
We also now have an admin API for starting background jobs that we expect folks to have to run manually sometimes: https://matrix-org.github.io/synapse/develop/usage/administration/admin_api/background_updates.html#run The synapse/synapse/rest/admin/background_updates.py Lines 125 to 147 in e24ff8e
I think this gives us a little bit of protection too? |
@DMRobertson thought that we might ask people to insert some entries into this for the user directory, I believe we used to but now have the above admin commands. I did find some references in our upgrade notes though: These ask to insert the I think this is safe to do, so I'm going to merge it. 👍 |
Sorry, I should have mentioned this somewhere for completeness. I was thinking of here. It used to look like this and refer to a SQL migration file. |
From a thread: #12899 (comment)
It seems that
register_noop_background_update(...)
could be replaced withDELETE FROM background_updates WHERE name = '....';
This would be nicer since we don't end up with dead code,
register_noop_background_update
was added in 6b02fc8 and from the conversation in #synapse-dev it seems like theDELETE
approach was not considered.The text was updated successfully, but these errors were encountered: