summary refs log tree commit diff
path: root/synapse/storage/stats.py
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-30 16:26:40 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-30 16:26:40 +0100
commit6f5e543901b19cd24d0eb104b0e40f4fda324fc5 (patch)
tree6ac7c6d1d9ebe435e6dda038fc9dee44be235c4a /synapse/storage/stats.py
parentFixes to counting and stats deltas (diff)
downloadsynapse-6f5e543901b19cd24d0eb104b0e40f4fda324fc5.tar.xz
Various fixes
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Diffstat (limited to 'synapse/storage/stats.py')
-rw-r--r--synapse/storage/stats.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py
index 7bf729c9d8..c022f620fc 100644
--- a/synapse/storage/stats.py
+++ b/synapse/storage/stats.py
@@ -948,10 +948,11 @@ class StatsStore(StateDeltasStore):
             src_row = self._simple_select_one_txn(
                 txn, src_table, keyvalues, copy_columns
             )
+            all_dest_keyvalues = {**keyvalues, **extra_dst_keyvalues}
             dest_current_row = self._simple_select_one_txn(
                 txn,
                 into_table,
-                keyvalues={ **keyvalues, **extra_dst_keyvalues },
+                keyvalues=all_dest_keyvalues,
                 retcols=list(chain(additive_relatives.keys(), copy_columns)),
                 allow_none=True,
             )
@@ -968,7 +969,7 @@ class StatsStore(StateDeltasStore):
             else:
                 for (key, val) in additive_relatives.items():
                     src_row[key] = dest_current_row[key] + val
-                self._simple_update_txn(txn, into_table, keyvalues, src_row)
+                self._simple_update_txn(txn, into_table, all_dest_keyvalues, src_row)
 
     def incremental_update_room_total_events_and_bytes(self, in_positions):
         """