-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lib] Use queue when processing inbound messages from the DB
Summary: Use the queue instead of processing operations in a loop. https://linear.app/comm/issue/ENG-9470/mitigate-risks-of-effects-running-on-outdated-data Test Plan: Disabled inbound messages processing by commenting out `handleOlmMessageToDevice` in `usePeerToPeerMessageHandler`. On one device, created a thread, changed its name, and then its description. These operations weren't processed on another device. Refreshed the app so that the operations are read from the DB and processed. Made sure that the result is correct. Checked what was the behavior before this diff. Surprisingly, it was the same. Using the queue here sounds more correct and feels safer, but the previous approach also works correctly. Reviewers: kamil, inka Reviewed By: kamil Subscribers: ashoat Differential Revision: https://phab.comm.dev/D13623
- Loading branch information
Showing
1 changed file
with
98 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters