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)
Thu, Jun 13, 1:16 AM
Unknown Object (File)
Wed, Jun 12, 8:21 AM
Unknown Object (File)
Mon, Jun 10, 1:09 AM
Unknown Object (File)
Tue, May 28, 5:42 AM
Unknown Object (File)
Tue, May 28, 5:41 AM
Unknown Object (File)
Tue, May 28, 5:41 AM
Unknown Object (File)
Tue, May 28, 5:38 AM
Unknown Object (File)
Sat, May 18, 9:00 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