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

Remove RequestedLatestEvents field from UserRoomData #324

Merged
merged 7 commits into from
Oct 3, 2023

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Oct 2, 2023

Helps with the sort of confusion I had complained about in #46.

My goal here is to make the UserRoomData type contain exactly the data that the UserCache is responsible for maintaining. This is step 1 of N, for some integer N > 1.

@DMRobertson DMRobertson changed the title Remove `RequestedLast Remove RequestedLatestEvents field from UserRoomData Oct 2, 2023
@DMRobertson DMRobertson marked this pull request as ready for review October 2, 2023 18:28
Copy link
Member

@kegsay kegsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I had thought maybe the UserRoomData/timelines were got atomically with the same lock but no, it doesn't. Timelines are pinned on the loadPos and URDs are just whatever is in the user cache at the time.

@DMRobertson
Copy link
Contributor Author

I had thought maybe the UserRoomData/timelines were got atomically with the same lock but no, it doesn't. Timelines are pinned on the loadPos and URDs are just whatever is in the user cache at the time.

I had the same thought, but concluded that this was no worse than what we have today. Note that the global metadata is also just whatever happens to be in-memory too.

@DMRobertson DMRobertson merged commit 79ee561 into main Oct 3, 2023
7 checks passed
@DMRobertson DMRobertson deleted the dmr/userroomdata branch October 3, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants