summary refs log tree commit diff
path: root/synapse/replication/slave
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-11-04 12:40:18 +0000
committerGitHub <noreply@github.com>2019-11-04 12:40:18 +0000
commitcc6243b4c08bfae77c9ff29d23c40568ab284924 (patch)
tree11ede90138ce8740735cc098407306f0d4393aac /synapse/replication/slave
parentMerge pull request #6301 from matrix-org/babolivier/msc2326 (diff)
downloadsynapse-cc6243b4c08bfae77c9ff29d23c40568ab284924.tar.xz
document the REPLICATE command a bit better (#6305)
since I found myself wonder how it works
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()