mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -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
|
@ -347,9 +347,8 @@ class EventFederationStore(SQLBaseStore):
|
|||
def get_forward_extremeties_for_room(self, room_id, stream_ordering):
|
||||
# We want to make the cache more effective, so we clamp to the last
|
||||
# change before the given ordering.
|
||||
last_change = self._events_stream_cache.get_pos_of_last_change(room_id)
|
||||
if last_change:
|
||||
stream_ordering = min(last_change, stream_ordering)
|
||||
last_change = self._events_stream_cache.get_max_pos_of_last_change(room_id)
|
||||
stream_ordering = min(last_change, stream_ordering)
|
||||
|
||||
return self._get_forward_extremeties_for_room(room_id, stream_ordering)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue