mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 23:42:33 +01:00
303b40b988
Media downloaded as part of a URL preview is normally deleted after two days.
However, while a background database migration is running, the process is
stopped. A long-running database migration can therefore cause the media
store to fill up with old preview files.
This logic was added in #2697 to make sure that we didn't try to run the expiry
without an index on `local_media_repository.created_ts`; the original logic that
needs that index was added in #2478 (in `get_url_cache_media_before`, as
amended by 93247a424a
), and is still present.
Given that the background update was added before Synapse v1.0.0, just drop
this check and assume the index exists.
1 line
127 B
Text
1 line
127 B
Text
Fix a long-standing bug that downloaded media for URL previews was not deleted while database background updates were running.
|