-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sliding Sync: Look for bump_stamp
in the room timeline
#17684
Conversation
bump _stamp
in the room timeline
74b5990
to
18e1458
Compare
This allows us to skip checking the database a lot of the time.
18e1458
to
667a556
Compare
# instead we use the membership event position. | ||
if new_bump_event_pos.stream > 0: | ||
bump_stamp = new_bump_event_pos.stream | ||
if new_bump_stamp is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also check if it's negative? It seems like that may be possible if we're allowing it in #17673 (comment)
Or probably better to check that in _get_bump_stamp(...)
after we get_latest_bump_stamp_for_room(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, most of the code paths were checked in _get_bump_stamp(..)
and the only one that wasn't was checking the return of get_latest_bump_stamp_for_room
, which should never return negative values. But we may as well also check there too to be extra sure.
Co-authored-by: Eric Eastwood <[email protected]>
bump _stamp
in the room timelinebump_stamp
in the room timeline
This allows us to skip checking the database a lot of the time.