[BUG]: AnalyticsController.kt is neither sequential nor thread-safe #5364
Labels
bug
End user-perceivable behaviors which are not desirable.
Impact: Low
Low perceived user impact (e.g. edge cases).
Work: High
It's not clear what the solution is.
Describe the bug
AnlyticsController is using a single-thread dispatcher (blocking dispatcher) to asynchronously log events. A single thread dispatcher, however, does not guarantee sequentiality nor atomicity when there are suspend methods involved.
Steps To Reproduce
Multithreading bug. Can lead to random errors.
Expected Behavior
Log calls should be handled sequentialy.
Screenshots/Videos
No response
What device/emulator are you using?
No response
Which Android version is your device/emulator running?
No response
Which version of the Oppia Android app are you using?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: