diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-08 13:45:21 +0100 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-08-08 13:45:21 +0100 |
commit | be59910b93252e83af348bcfd8781eed75fcb674 (patch) | |
tree | 3b9145795bff0076067070d7f1d4351cd7a622c3 /synapse/storage/events.py | |
parent | Ability to whitelist specific threepids against monthly active user limiting (diff) | |
parent | Merge pull request #3633 from matrix-org/neilj/mau_tracker (diff) | |
download | synapse-be59910b93252e83af348bcfd8781eed75fcb674.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/reserved_users
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index e8e5a0fe44..ce32e8fefd 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -485,9 +485,14 @@ class EventsStore(EventFederationStore, EventsWorkerStore, BackgroundUpdateStore new_forward_extremeties=new_forward_extremeties, ) persist_event_counter.inc(len(chunk)) - synapse.metrics.event_persisted_position.set( - chunk[-1][0].internal_metadata.stream_ordering, - ) + + if not backfilled: + # backfilled events have negative stream orderings, so we don't + # want to set the event_persisted_position to that. + synapse.metrics.event_persisted_position.set( + chunk[-1][0].internal_metadata.stream_ordering, + ) + for event, context in chunk: if context.app_service: origin_type = "local" |