element-hq / element-hq/synapse
Requests that modify push rules cannot be routed to workers
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#13382](https://github.com/matrix-org/synapse/issues/13382).
---
https://github.com/matrix-org/synapse/pull/5063 allowed worker processes to service read-only push rule-related endpoints. This is an issue to track the remaining push rule-related endpoints that require writes.
The following endpoints cannot yet be routed to worker processes:
* [`PUT /_matrix/client/v3/pushrules/{scope}/{kind}/{ruleId}`](https://spec.matrix.org/v1.3/client-server-api/#put_matrixclientv3pushrulesscopekindruleid)
* [`DELETE /_matrix/client/v3/pushrules/{scope}/{kind}/{ruleId}`](https://spec.matrix.org/v1.3/client-server-api/#delete_matrixclientv3pushrulesscopekindruleid)
* [`PUT /_matrix/client/v3/pushrules/{scope}/{kind}/{ruleId}/actions`](https://spec.matrix.org/v1.3/client-server-api/#put_matrixclientv3pushrulesscopekindruleidactions)
* [`PUT /_matrix/client/v3/pushrules/{scope}/{kind}/{ruleId}/enabled`](https://spec.matrix.org/v1.3/client-server-api/#put_matrixclientv3pushrulesscopekindruleidenabled)
I believe this hinges on converting the push rules stream to use a [MultiWriterIdGenerator](https://github.com/matrix-org/synapse/blob/10a88ba91cb16ccf757984f0a7d41ddf8b4dc07f/synapse/storage/util/id_generators.py#L262), instead of what we have today? https://github.com/matrix-org/synapse/blob/0d1d3e070886694eff1fa862cd203206b1a63372/synapse/storage/databases/main/push_rule.py#L132-L139
We did a similar piece of work for [moving presence off of the main process](https://github.com/matrix-org/synapse/pull/9820).
Contributor guide
Assessment
This issue has not been assessed yet.