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.
This commit is contained in:
Richard van der Hoff 2020-04-20 11:43:29 +01:00 committed by GitHub
parent 054c231e58
commit 0f8f02bc39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 5 deletions

View file

@ -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: