This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
AS scheduler may drop events during a restart #11637
Labels
A-Application-Service
Related to AS support
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
Description
The AS scheduler keeps track of events to send to each AS in memory as they come in, only pushing these into the database (as an AS transaction) once any in-flight requests have been completed:
synapse/synapse/appservice/scheduler.py
Lines 149 to 173 in c500bf3
Steps to reproduce
This means AS events could be lost during the following series of events:
Possible solution
Would it be possible to setup some kind of exit handling (
atexit
from stdlib?) that dumps any in-memory events into a new txn in the database before the process exits, this would prevent any loss of AS events.The text was updated successfully, but these errors were encountered: