Skip to content
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

Merged
merged 5 commits into from
Sep 10, 2024

Conversation

erikjohnston
Copy link
Member

This allows us to skip checking the database a lot of the time.

@MadLittleMods MadLittleMods changed the title Look for bump stamp in the room timeline Sliding Sync: Look for bump _stamp in the room timeline Sep 9, 2024
This allows us to skip checking the database a lot of the time.
# 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:
Copy link
Collaborator

@MadLittleMods MadLittleMods Sep 9, 2024

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(...)

Copy link
Member Author

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.

erikjohnston and others added 2 commits September 10, 2024 09:52
@erikjohnston erikjohnston merged commit 9689ac3 into develop Sep 10, 2024
39 checks passed
@erikjohnston erikjohnston deleted the erikj/ss_timeline_stamp branch September 10, 2024 09:20
@MadLittleMods MadLittleMods changed the title Sliding Sync: Look for bump _stamp in the room timeline Sliding Sync: Look for bump_stamp in the room timeline Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants