After restoration we should clear device specific data from the KeyserverStore. It should be filled in by the new device during primary device restoration/ secondary device login.
Depends on D11074
Paths
| Differential D11077 Authored by michal on Feb 14 2024, 7:30 AM.
Details Summary After restoration we should clear device specific data from the KeyserverStore. It should be filled in by the new device during primary device restoration/ secondary device login. Depends on D11074 Test Plan On web and mobile:
Diff Detail
Event TimelineHerald added subscribers: tomek, ashoat. · View Herald TranscriptFeb 14 2024, 7:31 AM2024-02-14 07:31:01 (UTC-8) Harbormaster completed remote builds in B26835: Diff 37078.Feb 14 2024, 7:46 AM2024-02-14 07:46:14 (UTC-8) Comment Actions Let me know if I'm missing something, but if there's some data we don't need in the backup, shouldn't we prevent it from being included, instead of clearing it after restoration? Comment Actions
The reason for that is probably due to my concerns that I outlined in D10780. I think that you are right - we should avoid backing those data up instead of removing them after restoration. The problem is that those data are "invisible" in C++ since for KeyserverStore we don't have a C++ db entity like for MessageStore but we just store a JSON string under some id key instead. We could do parsing with folly but it is inefficient, buggy and shows weakness of db design. Comment Actions Is there a codepath that will lead to populating data that we remove here with accurate data? Comment Actions I'm not entirely opposed to parsing the JSON in C++ via Folly. Seems better than storing the data only to throw it away
Revision Contents
Diff 37078 lib/ops/keyserver-store-ops.js
native/backup/use-client-backup.js
web/database/worker/backup.js
web/database/worker/process-operations.js
|