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

Create ability to refresh user thumbnails after deleting media_store cache on homeserver #10853

Closed
gbolcer opened this issue Sep 20, 2021 · 4 comments
Labels
T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@gbolcer
Copy link

gbolcer commented Sep 20, 2021

Discussed in https://github.com/matrix-org/synapse/discussions/10850

Originally posted by gbolcer September 19, 2021
I ran out of disk space on my homeserver and there was some unwanted user avatars from blocked users. To do this, I deleted the content in the media_store incorrectly--on the file system versus through the API. I mistakenly thought it would just re-populate the cache.

Right now I can get the homeserver.com/_matrix/media/r0/download/matrix.org/nXyZyXXXXX URL for the avatar which is broken. If I swap out homeserver.com for matrix.org I get the correct avatar (at least for the ones registered at matrix.org).

Is there an easy way to repopulate the local media_store cache on the homeserver? Force it to reload the images from the original user account/cache?

@DMRobertson DMRobertson added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. X-Needs-Discussion labels Sep 20, 2021
@erikjohnston erikjohnston added T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. and removed S-Tolerable Minor significance, cosmetic issues, low or no impact to users. labels Sep 22, 2021
@erikjohnston
Copy link
Member

FTR it looks like you can manually call the purge remote media admin API on the files you deleted (as it ignores missing files), which should cause Synapse to refetch the remote media again next time it is requested.

@gbolcer
Copy link
Author

gbolcer commented Sep 23, 2021

Thank you, I did end up calling the purge API, but it didn't seem to fix it. Do I need to call purge with each individual URL? Let me test with one and see what happens.

Just for the record, I am running Synapse 1.37.1 as the upgrade to 1.42/1.43rc caused my Java SDK to break for my bot.

@dklimpel
Copy link
Contributor

Related or duplicate to #1555 ?

@richvdh
Copy link
Member

richvdh commented Oct 29, 2021

looks like it.

@richvdh richvdh closed this as completed Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

6 participants