synapse/changelog.d
Eric Eastwood daf498e099
Fix 500 error on /messages when we accumulate more than 5 backward extremities (#11027)
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'
```
2021-10-14 18:53:45 -05:00
..
.gitignore Correct attrs package name in requirements (#3492) 2018-07-07 10:46:59 +10:00
10548.feature Port the Password Auth Providers module interface to the new generic interface (#10548) 2021-10-13 11:21:52 +00:00
10972.misc Add type hints to synapse.storage.databases.main.client_ips (#10972) 2021-10-12 13:50:34 +01:00
10975.feature Resolve and share state_groups for all historical events in batch (MSC2716) (#10975) 2021-10-13 17:44:00 -05:00
11024.misc Add support for ubuntu 21.10 "Impish Indri" (#11024) 2021-10-12 11:29:39 -07:00
11027.bugfix Fix 500 error on /messages when we accumulate more than 5 backward extremities (#11027) 2021-10-14 18:53:45 -05:00
11035.misc Rearrange the user_directory's _handle_deltas function (#11035) 2021-10-13 12:50:00 +00:00
11048.misc Simplify the user admin API tests (#11048) 2021-10-12 20:38:48 +01:00
11054.misc Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
11055.misc Update _wrap_in_base_path type hints to preserve function arguments (#11055) 2021-10-12 18:19:21 +01:00
11056.misc Remove dead code from MediaFilePaths (#11056) 2021-10-13 13:41:24 +01:00
11057.misc Add tests for MediaFilePaths (#11057) 2021-10-12 18:19:35 +01:00
11065.misc Be more lenient when parsing the version for oEmbed responses. (#11065) 2021-10-13 07:00:07 -04:00
11066.misc Add type hints to synapse.events.*. (#11066) 2021-10-13 07:24:07 -04:00
11068.misc Always dump logs from trial during CI. (#11068) 2021-10-12 20:09:49 +00:00
11069.doc Fix upgrade dead links (#11069) 2021-10-13 14:32:43 +01:00
11071.misc Add a test for a workaround concerning the behaviour of third-party rule modules and SynapseErrors. (#11071) 2021-10-14 14:14:15 +01:00
11076.misc Fix-up some type hints in the relations tests. (#11076) 2021-10-14 09:19:35 -04:00
11077.bugfix Attempt different character encodings when previewing a URL. (#11077) 2021-10-14 10:17:20 -04:00
11089.bugfix Ensure each charset is attempted only once during media preview. (#11089) 2021-10-14 18:51:44 +00:00