diff options
author | Mathieu Velten <mathieuv@matrix.org> | 2022-12-15 17:04:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 16:04:23 +0000 |
commit | 54c012c5a8722725cf104fa6205f253b5b9b0192 (patch) | |
tree | 12f897e42b163460caebeade53722353008c5c3d /synapse/handlers/room_batch.py | |
parent | Fix missing word in autotune sub-option description (#14674) (diff) | |
download | synapse-54c012c5a8722725cf104fa6205f253b5b9b0192.tar.xz |
Make `handle_new_client_event` throws `PartialStateConflictError` (#14665)
Then adapts calling code to retry when needed so it doesn't 500 to clients. Signed-off-by: Mathieu Velten <mathieuv@matrix.org> Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Diffstat (limited to 'synapse/handlers/room_batch.py')
-rw-r--r-- | synapse/handlers/room_batch.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/handlers/room_batch.py b/synapse/handlers/room_batch.py index 411a6fb22f..c73d2adaad 100644 --- a/synapse/handlers/room_batch.py +++ b/synapse/handlers/room_batch.py @@ -375,6 +375,8 @@ class RoomBatchHandler: # Events are sorted by (topological_ordering, stream_ordering) # where topological_ordering is just depth. for (event, context) in reversed(events_to_persist): + # This call can't raise `PartialStateConflictError` since we forbid + # use of the historical batch API during partial state await self.event_creation_handler.handle_new_client_event( await self.create_requester_for_user_id_from_app_service( event.sender, app_service_requester.app_service |