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

Fix missing latest posts #4536

Merged
merged 3 commits into from
Mar 18, 2025
Merged

Fix missing latest posts #4536

merged 3 commits into from
Mar 18, 2025

Conversation

latter-bolden
Copy link
Member

The prod build last night included a DB migration to save the new activity read marker setting. This uncovered a bug with our latest posts logic — when the migration wipes all SQL data, the keyval store keeps its existing headsSyncedAt timestamp. This means syncLatestPost thinks it already has messages that it doesn't.

To fix, we'll now clear out that key anytime we purge the DB. I tried upgrading from an older version to confirm it works, but wanted to double check with y'all if purge is always called in these migration scenarios?

Another thought I had: if we have more of these sync optimization flags, it might be worth considering an optional persistAfterMigration storage item flag (analogous to persistAfterLogout).

Copy link
Member

@patosullivan patosullivan left a comment

Choose a reason for hiding this comment

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

makes sense, let's just update electrondb as well before merging

@latter-bolden latter-bolden merged commit eb54a9a into develop Mar 18, 2025
1 check passed
@latter-bolden latter-bolden deleted the lb/latest-posts-gone branch March 18, 2025 17:20
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