forked-synapse/synapse
Erik Johnston bf4db42920 Don't unnecessarily block notifying of new events.
When persisting events we calculate new stream orderings up front.
Before we notify about an event all events with lower stream orderings
must have finished being persisted.

This PR moves the assignment of stream ordering till *after* calculated
the new current state and split the batch of events into separate chunks
for persistence. This means that if it takes a long time to calculate
new current state then it will not block events in other rooms being
notified about.

This should help reduce some global pauses in the events stream which
can last for tens of seconds (if not longer), caused by some
particularly expensive state resolutions.
2019-08-06 13:32:02 +01:00
..
_scripts Run Black. (#5482) 2019-06-20 19:32:02 +10:00
api Change user deactivated errcode to USER_DEACTIVATED and use it (#5686) 2019-07-31 15:19:06 +01:00
app Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
appservice Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
config Lint 2019-08-01 12:19:08 +02:00
crypto Share SSL options for well-known requests 2019-07-31 10:39:24 +01:00
events Merge pull request #5805 from matrix-org/erikj/validate_state 2019-08-01 13:45:48 +01:00
federation Return 502 not 500 when failing to reach any remote server. 2019-08-01 13:47:31 +01:00
groups Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
handlers Account validity: allow defining HTML templates to serve the us… (#5807) 2019-08-01 16:09:25 +02:00
http Handle incorrectly encoded query params correctly 2019-08-01 13:23:00 +01:00
logging Make Jaeger fully configurable (#5694) 2019-07-23 15:46:04 +01:00
metrics Support Prometheus_client 0.4.0+ (#5636) 2019-07-18 23:57:15 +10:00
module_api Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
push Explicitly check that tombstone is a state event before notifying. 2019-07-31 16:32:03 +01:00
replication Bugfixes 2019-07-24 13:47:51 +01:00
res/templates Allow defining HTML templates to serve the user on account renewal 2019-08-01 11:59:27 +02:00
rest Lint 2019-08-01 12:19:08 +02:00
server_notices Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
state Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
static Add 'rel' attribute to default welcome page. (#5695) 2019-07-19 12:03:36 +01:00
storage Don't unnecessarily block notifying of new events. 2019-08-06 13:32:02 +01:00
streams Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
util Add kwargs and doc 2019-07-29 10:03:14 +02:00
__init__.py 1.2.1 2019-07-26 11:33:16 +01:00
event_auth.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
notifier.py Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
python_dependencies.py Add process hooks to tell systemd our state. 2019-07-22 14:52:18 +01:00
secrets.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
server.py cleanups 2019-06-27 00:37:41 +01:00
server.pyi Run Black. (#5482) 2019-06-20 19:32:02 +10:00
types.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
visibility.py Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00