mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Fix synapse_event_persisted_position
metric (#12390)
Fixes a bug introduced in #11417 where we would only included backfilled events in `synapse_event_persisted_position`
This commit is contained in:
parent
ae01a7edd3
commit
6fe757d69e
1
changelog.d/12390.bugfix
Normal file
1
changelog.d/12390.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix a bug introduced in Synapse 1.49.0 which caused the `synapse_event_persisted_position` metric to have invalid values.
|
@ -197,9 +197,9 @@ class PersistEventsStore:
|
||||
)
|
||||
persist_event_counter.inc(len(events_and_contexts))
|
||||
|
||||
if stream < 0:
|
||||
# backfilled events have negative stream orderings, so we don't
|
||||
# want to set the event_persisted_position to that.
|
||||
if not use_negative_stream_ordering:
|
||||
# we don't want to set the event_persisted_position to a negative
|
||||
# stream_ordering.
|
||||
synapse.metrics.event_persisted_position.set(stream)
|
||||
|
||||
for event, context in events_and_contexts:
|
||||
|
Loading…
Reference in New Issue
Block a user