summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-04 10:40:59 +0000
committerErik Johnston <erik@matrix.org>2015-02-04 10:40:59 +0000
commit03d415a6a23300e36b5e6c35080ac4dd8ab06815 (patch)
treecea4da1b1261321b896fca77cb8ccf2769c05ac0
parentFix state resolution to remember join_rules is a type of auth event. (diff)
downloadsynapse-03d415a6a23300e36b5e6c35080ac4dd8ab06815.tar.xz
Brief comment on why we do some things on every call to persist_event and not others
-rw-r--r--synapse/storage/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 30ce378900..a63c59a8a2 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -239,6 +239,12 @@ class DataStore(RoomMemberStore, RoomStore,
             event.internal_metadata.get_dict()
         )
 
+        # If we have already persisted this event, we don't need to do any
+        # more processing.
+        # The processing above must be done on every call to persist event,
+        # since they might not have happened on previous calls. For example,
+        # if we are persisting an event that we had persisted as an outlier,
+        # but is no longer one.
         if have_persisted:
             if not outlier:
                 sql = (