Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Always return a deferred from get_current_state_deltas. #7019

Merged
merged 2 commits into from
Mar 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/7019.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port `synapse.handlers.presence` to async/await.
4 changes: 3 additions & 1 deletion synapse/storage/data_stores/main/state_deltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

import logging

from twisted.internet import defer

from synapse.storage._base import SQLBaseStore

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -56,7 +58,7 @@ def get_current_state_deltas(self, prev_stream_id: int, max_stream_id: int):
# if the CSDs haven't changed between prev_stream_id and now, we
# know for certain that they haven't changed between prev_stream_id and
# max_stream_id.
return max_stream_id, []
return defer.succeed((max_stream_id, []))

def get_current_state_deltas_txn(txn):
# First we calculate the max stream id that will give us less than
Expand Down