Merge pull request #2268 from matrix-org/erikj/entity_has_changed

Fix has_any_entity_changed
This commit is contained in:
Erik Johnston 2017-06-09 15:30:55 +01:00 committed by GitHub
commit 1e9b4d5a95

View File

@ -96,10 +96,10 @@ class StreamChangeCache(object):
if stream_pos >= self._earliest_known_stream_pos:
self.metrics.inc_hits()
if stream_pos >= max(self._cache):
return False
else:
return True
keys = self._cache.keys()
i = keys.bisect_right(stream_pos)
return i < len(keys)
else:
self.metrics.inc_misses()
return True