Page MenuHomePhabricator

Share database worker thread between CommCoreModule and AppDelegate
AbandonedPublic

Authored by marcin on Aug 30 2022, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 4 2024, 7:01 PM
Unknown Object (File)
Apr 4 2024, 7:01 PM
Unknown Object (File)
Apr 4 2024, 7:00 PM
Unknown Object (File)
Mar 18 2024, 12:18 AM
Unknown Object (File)
Feb 22 2024, 5:54 PM
Unknown Object (File)
Feb 22 2024, 5:50 PM
Unknown Object (File)
Feb 22 2024, 11:54 AM
Unknown Object (File)
Jan 13 2024, 5:13 PM
Subscribers

Details

Reviewers
tomek
atul
jon
Summary

This differential is a refactor that enables to share database worker thread between AppDelegate and CommCoreModule. We suspect that the reason for iOS 137 crash is that we access SQLite database from thread upon rescind when some other database operations is being executed on databaseThread of CommCoreModule. Sharing database thread with CommCoreModule and AppDelegate should remedy the crash then. IMPORTANT: this revision is not going to be landed. We will create release build with its commit, push to the master and revert it. Therefore it is acceptable that code here is not 100% clean. We only want it to work to either confirm or refute our theory. If it happens to be a remedy for the crash we will create another one with clean OOP design that will be traditionally landed. Review here should focus on correctness and edge cases that might not have been tested.

Test Plan

Release build created from commit represented by this revision should be free from iOS 137 crashes even though it will fully unlock rescinding functionality.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-1714
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Looks ok as a test. In the proper solution we should only enable multithreading in CommCoreModule constructor, just like we do for network GlobalNetworkSingleton::instance.enableMultithreading();.

This revision is now accepted and ready to land.Aug 30 2022, 8:35 AM

GlobalDBSingleton handles that.