mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 09:59:32 -05:00
Use stream.current_token() and remove stream_positions() (#7172)
We move the processing of typing and federation replication traffic into their handlers so that `Stream.current_token()` points to a valid token. This allows us to remove `get_streams_to_replicate()` and `stream_positions()`.
This commit is contained in:
parent
6b22921b19
commit
3085cde577
19 changed files with 30 additions and 154 deletions
|
|
@ -93,12 +93,6 @@ class SlavedEventStore(
|
|||
def get_room_min_stream_ordering(self):
|
||||
return self._backfill_id_gen.get_current_token()
|
||||
|
||||
def stream_positions(self):
|
||||
result = super(SlavedEventStore, self).stream_positions()
|
||||
result["events"] = self._stream_id_gen.get_current_token()
|
||||
result["backfill"] = -self._backfill_id_gen.get_current_token()
|
||||
return result
|
||||
|
||||
def process_replication_rows(self, stream_name, token, rows):
|
||||
if stream_name == "events":
|
||||
self._stream_id_gen.advance(token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue