OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Improve synchronization in the remaining executors (Identity, Subscription, User) to prevent concurrent access crashes.
Details
In #1376, a DispatchQueue was added to the Operation Repo and the Property Executor to serialize access to shared data. These two components encounter the most updates and frequent mutations by different threads. Though rare, the other executors can also encounter concurrent access.
The changes for the Operation Repo and Property Executor appear to be mitigating crashes, so we are adding the same to all executors in this PR:
Identity Executor
Subscription Executor
User Executor (for creates, fetches, etc)
Motivation
We received a report of a crash that I believe is due to one of these remaining executors experiencing a concurrent state access / mutation.
Scope
Executors synchronize array access, mutation, and caching through a Dispatch Queue.
Testing
Unit testing
Added tests reproducing crashes
testSubscriptionExecutorConcurrency - add test to reproduce crash in Subscription Executor
testIdentityExecutorConcurrency - add test to reproduce crash in Identity Executor
testUserExecutorConcurrency - add test to reproduce crash in User Executor
testPropertyExecutorConcurrency - add test to confirm Property Executor does have have concurrency crashes
Manual testing
Unable to reproduce
Affected code checklist
[ ] Notifications
[ ] Display
[ ] Open
[ ] Push Processing
[ ] Confirm Deliveries
[ ] Outcomes
[ ] Sessions
[ ] In-App Messaging
[ ] REST API requests
[ ] Public API changes
Checklist
Overview
[x] I have filled out all REQUIRED sections above
[x] PR does one thing
[x] Any Public API changes are explained in the PR details and conform to existing APIs
Testing
[x] I have included test coverage for these changes, or explained why they are not needed
[x] All automated tests pass, or I explained why that is not possible
[x] I have personally tested this on my device, or explained why that is not possible
Final pass
[x] Code is as readable as possible.
[x] I have reviewed this PR myself, ensuring it meets each checklist item
Description
One Line Summary
Improve synchronization in the remaining executors (Identity, Subscription, User) to prevent concurrent access crashes.
Details
In #1376, a
DispatchQueue
was added to the Operation Repo and the Property Executor to serialize access to shared data. These two components encounter the most updates and frequent mutations by different threads. Though rare, the other executors can also encounter concurrent access.The changes for the Operation Repo and Property Executor appear to be mitigating crashes, so we are adding the same to all executors in this PR:
Motivation
We received a report of a crash that I believe is due to one of these remaining executors experiencing a concurrent state access / mutation.
Scope
Executors synchronize array access, mutation, and caching through a Dispatch Queue.
Testing
Unit testing
Manual testing
Unable to reproduce
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is