Closed Bug 482878 Opened 15 years ago Closed 15 years ago

service (_remoteSetup) needs to migrate payload formats

Categories

(Cloud Services :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hello, Assigned: Mardak)

References

Details

Attachments

(1 file)

We now wrap payloads in an array, and _remoteSetup doesn't deal with that case.  It needs to.
Attached patch v1Splinter Review
XX comment because we shouldn't need this down the line.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #366975 - Flags: review?(thunder)
P1 as bug 478327 breaks existing profiles and prevents them from syncing.
Depends on: 478327
Priority: -- → P1
Target Milestone: -- → 0.3
Version: unspecified → Trunk
Comment on attachment 366975 [details] [diff] [review]
v1

looks great
Attachment #366975 - Flags: review?(thunder) → review+
http://hg.mozilla.org/labs/weave/rev/430ce13b63f3
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
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
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.
>-    // 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.
> The problem was that even if you bumped the payload, existing old meta records

...even if you bumped the *version*...
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.

Attachment

General

Creator:
Created:
Updated:
Size: