mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 07:16:05 -04:00
Fix backfill replication to advance the stream correctly
This commit is contained in:
parent
71df327190
commit
8a65666454
2 changed files with 3 additions and 3 deletions
|
@ -118,7 +118,7 @@ class SlavedEventStore(BaseSlavedStore):
|
|||
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()
|
||||
result["backfill"] = -self._backfill_id_gen.get_current_token()
|
||||
return result
|
||||
|
||||
def process_replication(self, result):
|
||||
|
@ -136,7 +136,7 @@ class SlavedEventStore(BaseSlavedStore):
|
|||
|
||||
stream = result.get("backfill")
|
||||
if stream:
|
||||
self._backfill_id_gen.advance(stream["position"])
|
||||
self._backfill_id_gen.advance(-stream["position"])
|
||||
for row in stream["rows"]:
|
||||
self._process_replication_row(
|
||||
row, backfilled=True, state_resets=state_resets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue