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

On catchup, process each row with its own stream id #7286

Merged
merged 5 commits into from
Apr 20, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Remove the sanity check
Argh. It turns out that if you introduce sanity-checks, you discover the places
in which we are not adhering to them.
  • Loading branch information
richvdh committed Apr 17, 2020
commit 378d34e970fbd5e8ce5251ce1abdbf480be147ee
10 changes: 2 additions & 8 deletions synapse/util/caches/stream_change_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,8 @@ def entity_has_changed(self, entity, stream_pos):
"""
assert type(stream_pos) is int

# sanity-check that we are not going to overwrite existing data.
current = self._cache.get(stream_pos)
if current is not None:
if current != entity:
raise NotImplementedError(
"more than one entity changing at a stream position"
)
return
# 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)
Expand Down