summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-13 13:42:21 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-13 13:42:21 +0100
commit63878c03794d33a8767425e114845159e5c1cb9a (patch)
tree0de6af26d7acf38eb0de25adddd0fbe83e58642b /synapse/storage/events.py
parentMerge branch 'notifier_unify' into notifier_performance (diff)
downloadsynapse-63878c03794d33a8767425e114845159e5c1cb9a.tar.xz
Don't bother checking for updates if the stream token hasn't advanced for a user
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index a5a6869079..7d6df5f4c6 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -64,6 +64,9 @@ class EventsStore(SQLBaseStore):
         except _RollbackButIsFineException:
             pass
 
+        max_persisted_id = yield self._stream_id_gen.get_max_token(self)
+        defer.returnValue((stream_ordering, max_persisted_id))
+
     @defer.inlineCallbacks
     def get_event(self, event_id, check_redacted=True,
                   get_prev_content=False, allow_rejected=False,