summary refs log tree commit diff
path: root/synapse/util/caches/stream_change_cache.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-04-20 11:43:29 +0100
committerGitHub <noreply@github.com>2020-04-20 11:43:29 +0100
commit0f8f02bc39cf1879780f82bdb8dd581588d14cca (patch)
tree3c458ed62b2468cb45e357120fc05c64a78bcc88 /synapse/util/caches/stream_change_cache.py
parentUse a template for the SSO success page to allow for customization. (#7279) (diff)
downloadsynapse-0f8f02bc39cf1879780f82bdb8dd581588d14cca.tar.xz
On catchup, process each row with its own stream id (#7286)
Other parts of the code (such as the StreamChangeCache) assume that there will
not be multiple changes with the same stream id.

This code was introduced in #7024, and I hope this fixes #7206.
Diffstat (limited to 'synapse/util/caches/stream_change_cache.py')
-rw-r--r--synapse/util/caches/stream_change_cache.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/util/caches/stream_change_cache.py b/synapse/util/caches/stream_change_cache.py
index 235f64049c..c61d36a82e 100644
--- a/synapse/util/caches/stream_change_cache.py
+++ b/synapse/util/caches/stream_change_cache.py
@@ -126,6 +126,9 @@ class StreamChangeCache(object):
         """
         assert type(stream_pos) is int
 
+        # FIXME: add a sanity check here that we are not overwriting existing
+        # data in self._cache
+
         if stream_pos > self._earliest_known_stream_pos:
             old_pos = self._entity_to_key.get(entity, None)
             if old_pos is not None: