summary refs log tree commit diff
path: root/synapse/replication
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-03-31 11:20:57 +0100
committerMark Haines <mjark@negativecurvature.net>2016-03-31 11:20:57 +0100
commit62e395f0e36c680662e71e25b1556f3477a26b74 (patch)
treec314edc7427ed4eb544ecf6a09aeaf0056df6672 /synapse/replication
parentLine length (diff)
parentUse a namedtuple rather than tuple unpacking (diff)
downloadsynapse-62e395f0e36c680662e71e25b1556f3477a26b74.tar.xz
Merge pull request #676 from matrix-org/markjh/replicate_stateIII
Add replication streams for ex outliers and current state resets
Diffstat (limited to 'synapse/replication')
-rw-r--r--synapse/replication/resource.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/synapse/replication/resource.py b/synapse/replication/resource.py
index 33cb2eafa3..c51a6fa103 100644
--- a/synapse/replication/resource.py
+++ b/synapse/replication/resource.py
@@ -204,17 +204,28 @@ class ReplicationResource(Resource):
                 request_events = current_token.events
             if request_backfill is None:
                 request_backfill = current_token.backfill
-            events_rows, backfill_rows = yield self.store.get_all_new_events(
+            res = yield self.store.get_all_new_events(
                 request_backfill, request_events,
                 current_token.backfill, current_token.events,
                 limit
             )
-            writer.write_header_and_rows("events", events_rows, (
+            writer.write_header_and_rows("events", res.new_forward_events, (
                 "position", "internal", "json", "state_group"
             ))
-            writer.write_header_and_rows("backfill", backfill_rows, (
+            writer.write_header_and_rows("backfill", res.new_backfill_events, (
                 "position", "internal", "json", "state_group"
             ))
+            writer.write_header_and_rows(
+                "forward_ex_outliers", res.forward_ex_outliers,
+                ("position", "event_id", "state_group")
+            )
+            writer.write_header_and_rows(
+                "backward_ex_outliers", res.backward_ex_outliers,
+                ("position", "event_id", "state_group")
+            )
+            writer.write_header_and_rows(
+                "state_resets", res.state_resets, ("position",)
+            )
 
     @defer.inlineCallbacks
     def presence(self, writer, current_token):