element-hq / element-hq/synapse

Fix AS sender catch up handling, after an AS comes back online by batching up events in transactions

Open
#8,704 0 comments 0 reactions 0 assignees View on GitHub
A-Application-Service A-Performance T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#8704](https://github.com/matrix-org/synapse/issues/8704).

---

If the AS is marked down then for every event persisted we create a new transaction for that AS with a single event in it. When the AS comes back online Synapse will then send these transactions one at a time, which can mean that an AS can take a very very long time to catch up, even if its processing the events quickly. We should send transactions with multiple events instead (though not too many).

(Split out from #8604)

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating Synapse's application-service sender catch-up handling and determine how persisted events are turned into transactions; done means an AS returning online receives bounded transactions containing multiple events rather than one event per transaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.