mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Change get_pos_of_last_change to return upper bound
This commit is contained in:
parent
cb3edec6af
commit
955f34d23e
2 changed files with 6 additions and 6 deletions
|
@ -122,7 +122,8 @@ class StreamChangeCache(object):
|
|||
self._earliest_known_stream_pos = max(k, self._earliest_known_stream_pos)
|
||||
self._entity_to_key.pop(r, None)
|
||||
|
||||
def get_pos_of_last_change(self, entity):
|
||||
"""Returns the stream pos of the last change for an entitiy, if known.
|
||||
def get_max_pos_of_last_change(self, entity):
|
||||
"""Returns an upper bound of the stream id of the last change to an
|
||||
entity.
|
||||
"""
|
||||
return self._entity_to_key.get(entity, None)
|
||||
return self._entity_to_key.get(entity, self._earliest_known_stream_pos)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue