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

Do not wait for background updates to complete do expire URL cache. #13657

Merged
merged 3 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13657.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug that downloaded media for URL previews was not deleted while database background updates were running.
4 changes: 0 additions & 4 deletions synapse/rest/media/v1/preview_url_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,6 @@ async def _expire_url_cache_data(self) -> None:

logger.debug("Running url preview cache expiry")

if not (await self.store.db_pool.updates.has_completed_background_updates()):
logger.debug("Still running DB updates; skipping url preview cache expiry")
return

def try_remove_parent_dirs(dirs: Iterable[str]) -> None:
"""Attempt to remove the given chain of parent directories

Expand Down