summary refs log tree commit diff
path: root/synapse/replication/slave
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-11-04 18:09:50 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-11-04 18:09:50 +0000
commite252ffadbc1df609d9455e0bfbc68dfe5cd146ee (patch)
treed52bb449ff87f53597a92ceccf8b5079f520c6eb /synapse/replication/slave
parentPrint out the actual number of affected rows (diff)
parentRemove the psutil dependency (#6318) (diff)
downloadsynapse-e252ffadbc1df609d9455e0bfbc68dfe5cd146ee.tar.xz
Merge branch 'develop' into babolivier/msc2326_bg_update
Diffstat (limited to 'synapse/replication/slave')
-rw-r--r--synapse/replication/slave/storage/_base.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/replication/slave/storage/_base.py b/synapse/replication/slave/storage/_base.py

index 182cb2a1d8..456bc005a0 100644 --- a/synapse/replication/slave/storage/_base.py +++ b/synapse/replication/slave/storage/_base.py
@@ -14,6 +14,7 @@ # limitations under the License. import logging +from typing import Dict import six @@ -44,7 +45,14 @@ class BaseSlavedStore(SQLBaseStore): self.hs = hs - def stream_positions(self): + def stream_positions(self) -> Dict[str, int]: + """ + Get the current positions of all the streams this store wants to subscribe to + + Returns: + map from stream name to the most recent update we have for + that stream (ie, the point we want to start replicating from) + """ pos = {} if self._cache_id_gen: pos["caches"] = self._cache_id_gen.get_current_token()