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

Add linearizer on user ID to push rule PUT/DELETE requests #16052

Merged
merged 3 commits into from Aug 11, 2023

Conversation

Fizzadar
Copy link
Contributor

@Fizzadar Fizzadar commented Aug 2, 2023

Pull Request Checklist

See: #16053

Signed off by Nick @ Beeper (@Fizzadar)

@Fizzadar Fizzadar marked this pull request as ready for review August 2, 2023 14:27
@Fizzadar Fizzadar requested a review from a team as a code owner August 2, 2023 14:27
@@ -53,26 +54,32 @@ def __init__(self, hs: "HomeServer"):
self.notifier = hs.get_notifier()
self._is_worker = hs.config.worker.worker_app is not None
self._push_rules_handler = hs.get_push_rules_handler()
self._push_rule_linearizer = Linearizer(name="push_rules")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if it matters, but this won't fix the issue if there are multiple workers involved. Would it make more sense to lock the user's push rule rows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's a good point, I'm basing the change entirley on the current state where push rules can only be modified on the main process, this only works while that limitation remains (does that block merging as-is, not sure?).

Copy link
Contributor

Choose a reason for hiding this comment

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

I had assumed we could move these to workers, my fault for not checking!

@clokep clokep requested a review from a team August 3, 2023 17:43
changelog.d/16052.bugfix Outdated Show resolved Hide resolved
Co-authored-by: Erik Johnston <erikj@jki.re>
@erikjohnston erikjohnston enabled auto-merge (squash) August 11, 2023 10:55
@erikjohnston erikjohnston merged commit 614efc4 into matrix-org:develop Aug 11, 2023
37 checks passed
@Fizzadar Fizzadar deleted the linearize-push-rule-endpoints branch August 11, 2023 13:17
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