Page MenuHomePhabricator

[web] Clear database on non-threadStore ops fail
ClosedPublic

Authored by michal on Apr 3 2024, 7:29 AM.
Tags
None
Referenced Files
F1776763: D11544.diff
Thu, May 16, 6:33 PM
Unknown Object (File)
Apr 11 2024, 9:29 PM
Unknown Object (File)
Apr 10 2024, 6:21 PM
Unknown Object (File)
Apr 10 2024, 4:12 PM
Unknown Object (File)
Apr 10 2024, 9:38 AM
Unknown Object (File)
Apr 9 2024, 3:02 PM
Unknown Object (File)
Apr 8 2024, 12:56 PM
Unknown Object (File)
Apr 3 2024, 7:40 AM
Subscribers

Details

Summary

ENG-7587 : Should we clear the web DB when some operations fail?
Clean the db on other (non-draft, non-report) ops.

Depends on D11539

Test Plan

Add throw new Error() on message store rekey op. Try sending a message. App displayed an alert and reloaded.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

michal requested review of this revision.Apr 3 2024, 7:44 AM
kamil added inline comments.
web/shared-worker/utils/store.js
209–216

can this be simplified using entries()? I am mostly worried about cases when someone adds something to storeOperations but forgets add it here so I will also inverse the condition

This revision is now accepted and ready to land.Apr 5 2024, 3:40 AM

Use entries instead of specifying each ops separately.