Page MenuHomePhabricator

[web] wrap store operations in transaction
ClosedPublic

Authored by kamil on Nov 30 2023, 5:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 30, 8:50 AM
Unknown Object (File)
Sat, Jun 29, 2:51 PM
Unknown Object (File)
Tue, Jun 25, 4:07 PM
Unknown Object (File)
Sat, Jun 22, 3:08 AM
Unknown Object (File)
Fri, Jun 21, 9:02 AM
Unknown Object (File)
Fri, Jun 21, 9:00 AM
Unknown Object (File)
May 22 2024, 5:13 AM
Unknown Object (File)
May 22 2024, 5:08 AM
Subscribers

Details

Summary

This is improvement and possible fix to: ENG-5910.

This is similar approach to native: link.

Test Plan
  1. Run tests
  2. Make sure persistence still works

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
web/database/worker/process-operations.js
85–114 ↗(On Diff #34050)

I think this should all be in one transaction. See comment here:

Arguably we should actually make all SQLite updates from a single Redux action get committed in a single transaction – today, even in native it appears that we wrap each individual store in its own transaction, rather than combining them together.

wrap everything in one transaction

web/database/worker/process-operations.js
85–114 ↗(On Diff #34050)

I wanted to match native but this also seems reasonable

kamil published this revision for review.Nov 30 2023, 6:27 AM

I think we should probably update native to match this too. Ultimately we're trying to match Redux behavior... because our master-reducer code has eg. MessageStore depending on ThreadStore, it's important that changes between the two are in sync

This revision is now accepted and ready to land.Nov 30 2023, 8:09 AM

I think we should probably update native to match this too. Ultimately we're trying to match Redux behavior... because our master-reducer code has eg. MessageStore depending on ThreadStore, it's important that changes between the two are in sync

ENG-6004

This revision was automatically updated to reflect the committed changes.