Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Delete expired url cache data #2478

Merged
merged 3 commits into from Sep 28, 2017
Merged

Conversation

erikjohnston
Copy link
Member

We also change the hierarchy of the url_cache* dirs to have the data prefixed by date. This makes it easier to admin from a FS perspective.

Copy link
Contributor

@NegativeMjark NegativeMjark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richvdh
Copy link
Member

richvdh commented Aug 26, 2022

Note that there were supsequent (un-PRed) fixes to this PR in 5f501ec, 93247a4, e1e7d76, 7cc483a, 4dc07e9, 768f00d, d5694ac

@richvdh
Copy link
Member

richvdh commented Aug 26, 2022

oh, and a PRed fix in #2697

clokep added a commit that referenced this pull request Aug 30, 2022
…13657)

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 93247a4), 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants