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, Sep 29, 11:15 AM
Unknown Object (File)
Fri, Sep 13, 6:57 AM
Unknown Object (File)
Fri, Sep 13, 6:56 AM
Unknown Object (File)
Fri, Sep 13, 6:55 AM
Unknown Object (File)
Aug 26 2024, 5:38 PM
Unknown Object (File)
Aug 26 2024, 8:26 AM
Unknown Object (File)
Aug 9 2024, 5:33 AM
Unknown Object (File)
Aug 9 2024, 5:33 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
Branch
add-transaction-on-web
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
web/database/worker/process-operations.js
85–114

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

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.