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
Unknown Object (File)
Tue, Nov 5, 6:54 PM
Unknown Object (File)
Sun, Nov 3, 1:59 AM
Unknown Object (File)
Oct 11 2024, 12:18 PM
Unknown Object (File)
Oct 11 2024, 12:18 PM
Unknown Object (File)
Oct 11 2024, 12:18 PM
Unknown Object (File)
Oct 11 2024, 12:18 PM
Unknown Object (File)
Oct 11 2024, 12:17 PM
Unknown Object (File)
Oct 11 2024, 12:17 PM
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.