diff options
author | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2019-08-27 13:40:00 +0100 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2019-08-27 13:40:00 +0100 |
commit | 544ba2c2e9ad8d3d9aa9041e3f724e5c96a15390 (patch) | |
tree | 1a6cf43228bc884b5ba11a0e3fff742712aae771 /synapse/storage | |
parent | Clarify `_update_stats_delta_txn` by adding code comments and kwargs. (diff) | |
download | synapse-544ba2c2e9ad8d3d9aa9041e3f724e5c96a15390.tar.xz |
Apply minor suggestions from review
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/stats.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py index 7959f5785b..c950ab9953 100644 --- a/synapse/storage/stats.py +++ b/synapse/storage/stats.py @@ -190,8 +190,7 @@ class StatsStore(StateDeltasStore): else: for (key, val) in additive_relatives.items(): current_row[key] += val - for (key, val) in absolutes.items(): - current_row[key] = val + current_row.update(absolutes) self._simple_update_one_txn(txn, table, keyvalues, current_row) def _upsert_copy_from_table_with_additive_relatives_txn( @@ -223,8 +222,8 @@ class StatsStore(StateDeltasStore): ins_columns = chain( keyvalues, copy_columns, - additive_relatives.keys(), - extra_dst_keyvalues.keys(), + additive_relatives, + extra_dst_keyvalues, ) sel_exprs = chain( keyvalues, |