Page MenuHomePhabricator

[native] Add CommSecureStore.set on main thread to resolve race with DB thread
ClosedPublic

Authored by ashoat on Sat, Jun 29, 12:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 4, 10:05 AM
Unknown Object (File)
Tue, Jul 2, 6:02 PM
Unknown Object (File)
Tue, Jul 2, 6:02 PM
Unknown Object (File)
Tue, Jul 2, 6:01 PM
Unknown Object (File)
Tue, Jul 2, 6:00 PM
Subscribers
None

Details

Summary

Start by reading the included code comment, which explains why we need it.

This resolves ENG-8069, which was an issue caused by D11702, which was supposed to address ENG-7700.

This Linear comment has some backstory.

Test Plan
  1. Test on physical Android device. Confirm that before this diff it can reproduce ENG-8069
  2. Delete Comm app from phone. Deploy a release build with yarn react-native run-android --variant=release (may need to make sure native/facts/authoritative_keyserver.json is not set)
  3. Repeat the following steps 10 times:
    • Open the app and wait for LoggedOutModal to render
    • Kill the app
    • Open the app again and see if it crashes
    • Between attempts, clear the app's internal storage via settings

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Because this is a major issue affecting end users, I'm going to land this without review and immediately put out a new release.

This revision was not accepted when it landed; it landed in state Needs Review.Sat, Jun 29, 12:55 PM
This revision was automatically updated to reflect the committed changes.
ashoat retitled this revision from [native] Add CommSecureStore.get on main thread to resolve race with DB thread to [native] Add CommSecureStore.set on main thread to resolve race with DB thread.Sat, Jun 29, 12:58 PM