mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 22:00:22 +00:00
Merge pull request #2268 from matrix-org/erikj/entity_has_changed
Fix has_any_entity_changed
This commit is contained in:
commit
1e9b4d5a95
1 changed files with 4 additions and 4 deletions
|
@ -96,10 +96,10 @@ class StreamChangeCache(object):
|
||||||
|
|
||||||
if stream_pos >= self._earliest_known_stream_pos:
|
if stream_pos >= self._earliest_known_stream_pos:
|
||||||
self.metrics.inc_hits()
|
self.metrics.inc_hits()
|
||||||
if stream_pos >= max(self._cache):
|
keys = self._cache.keys()
|
||||||
return False
|
i = keys.bisect_right(stream_pos)
|
||||||
else:
|
|
||||||
return True
|
return i < len(keys)
|
||||||
else:
|
else:
|
||||||
self.metrics.inc_misses()
|
self.metrics.inc_misses()
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue