On 28 May 2018 at 12:42, Mark Hammond <mhamm...@mozilla.com> wrote:

> On 28/05/2018 11:38 am, Ryan Kelly wrote:
>
>> However, once this first device has re-uploaded and restored a
>> sensible-looking timestamp to the "tabs" collection, what will be the
>> behaviour of other devices?  It seems like this might prevent them from
>> discovering that their own tab data has disappeared, and they'll only
>> recover after user navigation triggers them to upload a new modified tab
>> record.
>>
>
> Tabs are a little special - each client has exactly 1 record. Desktop
> further treats tabs as special by always uploading all tabs in the first
> sync for the session.
>
> But yeah, in general you are correct - other desktop devices already
> running may not recover until the browser is restarted.
>
> Thom has an interesting suggestion in the meeting last week, that we could
>> force clients into doing a full re-sync of a collection by modifing the
>> "syncid" for that collection in their meta/global record.  Would this be a
>> more reliable (albeit more hacky!) way to guide the clients into correct
>> behaviour here?
>>
>
> Yes, that should force clients to re-upload all of their tabs on the very
> next sync. Note also that simply removing tabs from meta/global should have
> the same result (the fist client to Sync should generate a new syncID)


Is this true of other collections in general?  In particular, I'm wondering
about the possibilities of recovering the user's data atop a point-in-time
backup using this method, along the following lines:

* We take regular backup snapshots of the user's data on the server
* Something bad happens to a storage node, and we want to restore the
user's data from a backup, so we:
    * Down the node, having it return 503s with backoff
    * Restore the db from backup
    * Futz with their meta/global to remove the syncIDs while leaving other
data intact
    * Restore the node to service
* On its next sync, the client detects that the syncIDs have changed and
does a full re-sync
* Despite potential data loss on the server side, we don't lose any updates
from the client!


  Ryan
_______________________________________________
Sync-dev mailing list
Sync-dev@mozilla.org
https://mail.mozilla.org/listinfo/sync-dev

Reply via email to