@@ -434,7 +434,7 @@ ingress:
434434 - " /_matrix/client/(unstable|v1)/org.matrix.msc4108/rendezvous$"
435435 - " /_synapse/client/rendezvous$"
436436 # federation overrides to main/master process
437- # - "/_matrix/federation/v1/openid/userinfo$"
437+ # - "/_matrix/federation/v1/openid/userinfo$" # should go to federation reader
438438 # send all other traffic to the main/master process, should go last in lb config
439439 masterRoutes :
440440 - " /_matrix/"
@@ -460,9 +460,15 @@ ingress:
460460 # https://matrix-org.github.io/synapse/latest/workers.html#the-receipts-stream
461461 # routes to receipts stream writer multiple workers
462462 # source: receipts.py:41, read_marker.py:40 - client_patterns() -> (r0|v3|unstable)
463+ # Caution(!): patterns must be longer than roomRoutes (73 chars) because of ImplementationSpecific
464+ # Both receipt URLs contain a room ID and would otherwise match roomRoutes first (longest wins),
465+ # routing to room workers which are NOT receipts stream writers -> assert _can_write_to_receipts -> 500
463466 receipts :
464- - " /_matrix/client/(r0|v3|unstable)/rooms/.*/receipt"
465- - " /_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers"
467+ # original
468+ # - "/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt"
469+ # - "/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers"
470+ - " /_matrix/client/(r0|v3|unstable)/rooms/(?:%21|!)[A-Za-z0-9._=\\ -]+(?::|%3[Aa])[A-Za-z0-9.\\ -]+/receipt"
471+ - " /_matrix/client/(r0|v3|unstable)/rooms/(?:%21|!)[A-Za-z0-9._=\\ -]+(?::|%3[Aa])[A-Za-z0-9.\\ -]+/read_markers"
466472 # https://matrix-org.github.io/synapse/latest/workers.html#the-presence-stream
467473 # routes to presence stream writer singleton worker
468474 # source: presence.py:43 client_patterns("/presence/.../status", v1=True) -> (api/v1|r0|v3|unstable)
0 commit comments