mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-21 03:34:22 -05:00
daf498e099
Found while working on the Gitter backfill script and noticed it only happened after we sent 7 batches, https://gitlab.com/gitterHQ/webapp/-/merge_requests/2229#note_665906390 When there are more than 5 backward extremities for a given depth, backfill will throw an error because we sliced the extremity list to 5 but then try to iterate over the full list. This causes us to look for state that we never fetched and we get a `KeyError`. Before when calling `/messages` when there are more than 5 backward extremities: ``` Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/synapse/http/server.py", line 258, in _async_render_wrapper callback_return = await self._async_render(request) File "/usr/local/lib/python3.8/site-packages/synapse/http/server.py", line 446, in _async_render callback_return = await raw_callback_return File "/usr/local/lib/python3.8/site-packages/synapse/rest/client/room.py", line 580, in on_GET msgs = await self.pagination_handler.get_messages( File "/usr/local/lib/python3.8/site-packages/synapse/handlers/pagination.py", line 396, in get_messages await self.hs.get_federation_handler().maybe_backfill( File "/usr/local/lib/python3.8/site-packages/synapse/handlers/federation.py", line 133, in maybe_backfill return await self._maybe_backfill_inner(room_id, current_depth, limit) File "/usr/local/lib/python3.8/site-packages/synapse/handlers/federation.py", line 386, in _maybe_backfill_inner likely_extremeties_domains = get_domains_from_state(states[e_id]) KeyError: '$zpFflMEBtZdgcMQWTakaVItTLMjLFdKcRWUPHbbSZJl' ``` |
||
---|---|---|
.. | ||
ui_auth | ||
__init__.py | ||
account_data.py | ||
account_validity.py | ||
admin.py | ||
appservice.py | ||
auth.py | ||
cas.py | ||
deactivate_account.py | ||
device.py | ||
devicemessage.py | ||
directory.py | ||
e2e_keys.py | ||
e2e_room_keys.py | ||
event_auth.py | ||
events.py | ||
federation_event.py | ||
federation.py | ||
groups_local.py | ||
identity.py | ||
initial_sync.py | ||
message.py | ||
oidc.py | ||
pagination.py | ||
password_policy.py | ||
presence.py | ||
profile.py | ||
read_marker.py | ||
receipts.py | ||
register.py | ||
room_batch.py | ||
room_list.py | ||
room_member_worker.py | ||
room_member.py | ||
room_summary.py | ||
room.py | ||
saml.py | ||
search.py | ||
send_email.py | ||
set_password.py | ||
sso.py | ||
state_deltas.py | ||
stats.py | ||
sync.py | ||
typing.py | ||
user_directory.py |