service (_remoteSetup) needs to migrate payload formats

RESOLVED FIXED in 0.3

Status

Cloud Services
General
P1
normal
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: thunder, Assigned: Mardak)

Tracking

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
We now wrap payloads in an array, and _remoteSetup doesn't deal with that case.  It needs to.
(Assignee)

Comment 1

9 years ago
Created attachment 366975 [details] [diff] [review]
v1

XXX comment because we shouldn't need this down the line.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #366975 - Flags: review?(thunder)
(Assignee)

Comment 2

9 years ago
P1 as bug 478327 breaks existing profiles and prevents them from syncing.
Depends on: 478327
Priority: -- → P1
Target Milestone: -- → 0.3
Version: unspecified → Trunk
(Reporter)

Comment 3

9 years ago
Comment on attachment 366975 [details] [diff] [review]
v1

looks great
Attachment #366975 - Flags: review?(thunder) → review+
(Assignee)

Comment 4

9 years ago
http://hg.mozilla.org/labs/weave/rev/430ce13b63f3
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

9 years ago
Erm. We might need to do something similar again now that I pushed a fix for bug 482670. But then I realized, there won't be a problem if we just bump up the version as it causes a server wipe. Might as well get rid of this now-old migration code.
Depends on: 482670
(Assignee)

Comment 6

9 years ago
Backed out changeset 430ce13b63f3 (bug 482878)
http://hg.mozilla.org/labs/weave/rev/1edebdd5553f

Bug 482670 restored un-wrapped payloads, so until a version bump, those using trunk will need to do a manual server wipe.
(Reporter)

Comment 7

9 years ago
>-    // XXX Bug 482878 Old payloads weren't array-wrapped, so migrate by wiping
>-    if (meta && meta.payload == null) {
>-      this._log.debug("Migrating to minimal payloads by wiping the server");
>-      meta = null;
>-    }
> 
>     let remoteVersion = (meta && meta.payload.storageVersion)?
>       meta.payload.storageVersion : "";

The problem was that even if you bumped the payload, existing old meta records would fail with 'meta.payload is undefined', and execution would stop rather than causing a wipe.

However, by now we've done a lot of version upgrades, and pretty much everyone should be using a version where meta.payload is defined.  So we can leave the extra check out.
(Reporter)

Comment 8

9 years ago
> The problem was that even if you bumped the payload, existing old meta records

...even if you bumped the *version*...

Updated

9 years ago
Component: Weave → General
Product: Mozilla Labs → Weave
Version: Trunk → unspecified
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.