diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-05-21 14:30:47 -0500 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2019-05-21 14:30:47 -0500 |
commit | 8fe26db968dd833976f59c7b122611896a211c30 (patch) | |
tree | fcb93235ee834737a451676ddbcb102d4afae538 /synapse/storage/state_deltas.py | |
parent | SHHS - Room Join Complexity (#5072) (diff) | |
parent | Room Statistics (#4338) (diff) | |
download | synapse-8fe26db968dd833976f59c7b122611896a211c30.tar.xz |
Merge remote-tracking branch 'origin/develop' into HEAD
Diffstat (limited to 'synapse/storage/state_deltas.py')
-rw-r--r-- | synapse/storage/state_deltas.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/storage/state_deltas.py b/synapse/storage/state_deltas.py index 31a0279b18..5fdb442104 100644 --- a/synapse/storage/state_deltas.py +++ b/synapse/storage/state_deltas.py @@ -84,10 +84,16 @@ class StateDeltasStore(SQLBaseStore): "get_current_state_deltas", get_current_state_deltas_txn ) - def get_max_stream_id_in_current_state_deltas(self): - return self._simple_select_one_onecol( + def _get_max_stream_id_in_current_state_deltas_txn(self, txn): + return self._simple_select_one_onecol_txn( + txn, table="current_state_delta_stream", keyvalues={}, retcol="COALESCE(MAX(stream_id), -1)", - desc="get_max_stream_id_in_current_state_deltas", + ) + + def get_max_stream_id_in_current_state_deltas(self): + return self.runInteraction( + "get_max_stream_id_in_current_state_deltas", + self._get_max_stream_id_in_current_state_deltas_txn, ) |