Sliding Sync: Look for bump_stamp in the room timeline#17684
Merged
Conversation
3 tasks
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: |
Contributor
There was a problem hiding this comment.
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(...)
Member
Author
There was a problem hiding this comment.
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.
MadLittleMods
approved these changes
Sep 9, 2024
Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
bump _stamp in the room timelinebump_stamp in the room timeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows us to skip checking the database a lot of the time.