summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-07-18 13:25:35 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-07-18 13:25:35 +0100
commit94463bf5fb76e1baa9409f8faf53055a68083209 (patch)
treeb4227986badb9e75cdcd2002de6dc0f84468d499 /synapse/handlers
parentChangelog for #5691 (diff)
downloadsynapse-94463bf5fb76e1baa9409f8faf53055a68083209.tar.xz
Disuse `room_stats.state_events` (relates to #5690)
since it is tricky to maintain and has no known use case (for now).

Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/stats.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/handlers/stats.py b/synapse/handlers/stats.py
index d3b1db4951..f595de1537 100644
--- a/synapse/handlers/stats.py
+++ b/synapse/handlers/stats.py
@@ -148,10 +148,6 @@ class StatsHandler(StateDeltasHandler):
             # quantise time to the nearest bucket
             now = (now // 1000 // self.stats_bucket_size) * self.stats_bucket_size
 
-            yield self.store.update_stats_delta(
-                now, "room", room_id, "state_events", +1
-            )
-
             if prev_event_id is None:
                 # this state event doesn't overwrite another,
                 # so it is a new effective/current state event
@@ -277,7 +273,9 @@ class StatsHandler(StateDeltasHandler):
                         "invited_members": 0,
                         "left_members": 0,
                         "banned_members": 0,
-                        "state_events": 1,
+                        # this column is disused but not yet removed from the
+                        # schema, so fill with -1.
+                        "state_events": -1,
                     },
                 )