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
F2111481: D5671.id18569.diff
Tue, Jun 25, 11:06 PM
F2102423: D5671.id18569.diff
Tue, Jun 25, 12:25 AM
Unknown Object (File)
Wed, Jun 19, 2:18 PM
Unknown Object (File)
Mon, Jun 17, 5:17 AM
Unknown Object (File)
Mon, Jun 17, 5:17 AM
Unknown Object (File)
Sun, Jun 16, 4:41 PM
Unknown Object (File)
Sun, Jun 16, 4:28 PM
Unknown Object (File)
Thu, Jun 13, 1:16 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
Branch
ashoat/androidNotifIssue
Lint
No Lint Coverage
Unit
No Test Coverage

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