-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support running multiple media repos. #7706
Conversation
This requires a new config option to specify which media repo should be responsible for running background jobs to e.g. clear out expired URL preview caches.
fb8c546
to
74295f3
Compare
I think the implementation looks sane, I don't have an opinion about using a config option vs. other approaches. |
Removing the review flag on this as Rich asked for some changes in #synapse-dev:matrix.org. |
Ok, this now uses a scheme where you specify which instance runs the background jobs. Unfortunately, to support backwards compat we can't require it when using split out media repo and so if you don't specify the config option it'll still run on all of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the backwards compatibility is OK since...you shouldn't have been running multiple in the past anyway, so hopefully people will read the docs on how to do it.
Co-authored-by: Patrick Cloke <[email protected]>
* commit 'b44bdd7f7': Support running multiple media repos. (#7706)
This requires a new config option to specify which media repo should be responsible for running background jobs to e.g. clear out expired URL preview caches.
This is a bit of an icky way of doing it, though I think somewhat consistent with how we do worker configs currently. There are a couple of other options here:
TBH though, it feels like we shouldn't block this behind trying to implement a distributed lock or changing how we configure workers