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)
Tue, Oct 29, 12:48 PM
Unknown Object (File)
Sep 29 2024, 11:27 PM
Unknown Object (File)
Sep 29 2024, 11:27 PM
Unknown Object (File)
Sep 29 2024, 11:26 PM
Unknown Object (File)
Sep 29 2024, 11:25 PM
Unknown Object (File)
Sep 7 2024, 1:01 AM
Unknown Object (File)
Sep 5 2024, 5:51 AM
Unknown Object (File)
Sep 5 2024, 5:51 AM
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