mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:56:02 -04:00
Remove stream ordering from Metadata dict (#8452)
There's no need for it to be in the dict as well as the events table. Instead, we store it in a separate attribute in the EventInternalMetadata object, and populate that on load. This means that we can rely on it being correctly populated for any event which has been persited to the database.
This commit is contained in:
parent
f64c6aae68
commit
f31f8e6319
13 changed files with 53 additions and 33 deletions
|
@ -248,6 +248,8 @@ class EventsPersistenceStorage:
|
|||
await make_deferred_yieldable(deferred)
|
||||
|
||||
event_stream_id = event.internal_metadata.stream_ordering
|
||||
# stream ordering should have been assigned by now
|
||||
assert event_stream_id
|
||||
|
||||
pos = PersistedEventPosition(self._instance_name, event_stream_id)
|
||||
return pos, self.main_store.get_room_max_token()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue