Page MenuHomePhabricator

[lib] Ensure messageStore.threads entry for each message from SQLite
ClosedPublic

Authored by ashoat on Nov 18 2022, 6:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 3:38 AM
Unknown Object (File)
Wed, Apr 17, 3:38 AM
Unknown Object (File)
Wed, Apr 17, 3:37 AM
Unknown Object (File)
Wed, Apr 17, 3:34 AM
Unknown Object (File)
Mar 28 2024, 12:06 PM
Unknown Object (File)
Mar 26 2024, 12:51 AM
Unknown Object (File)
Mar 26 2024, 12:51 AM
Unknown Object (File)
Feb 28 2024, 6:14 PM
Subscribers
None

Details

Summary

See 2b here. This diff makes sure that if a message is present in SQLite, we have a messageStore.threads entry for its corresponding thread.

Test Plan

Confirm that issue in ENG-2275 no longer repros

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tested this and it works to prevent crash, but the messages are all still lost since when the SAVE_MESSAGES action gets processed it ends up triggering updateMessageStoreWithLatestThreadInfos with an empty ThreadStore and thus generating a remove_messages_for_threads op to delete messages from SQLite. D5667 is still needed to prevent the SAVE_MESSAGES action from firing, but this change is still a good change.

This revision is now accepted and ready to land.Nov 21 2022, 10:44 AM