Page MenuHomePhabricator

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

Authored by michal on Wed, Apr 3, 7:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 9:29 PM
Unknown Object (File)
Wed, Apr 10, 6:21 PM
Unknown Object (File)
Wed, Apr 10, 4:12 PM
Unknown Object (File)
Wed, Apr 10, 9:38 AM
Unknown Object (File)
Tue, Apr 9, 3:02 PM
Unknown Object (File)
Mon, Apr 8, 12:56 PM
Unknown Object (File)
Wed, Apr 3, 7:40 AM
Unknown Object (File)
Wed, Apr 3, 7:39 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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

michal requested review of this revision.Wed, Apr 3, 7:44 AM
kamil added inline comments.
web/shared-worker/utils/store.js
209–216 ↗(On Diff #38842)

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.Fri, Apr 5, 3:40 AM

Use entries instead of specifying each ops separately.