Closed
Bug 814163
Opened 12 years ago
Closed 12 years ago
Migrate existing data to most-recent table, ensure most-recent items have id
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: daleharvey, Assigned: daleharvey)
Details
Attachments
(1 file, 2 obsolete files)
4.89 KB,
patch
|
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
bent.mozilla
:
checkin+
|
Details | Diff | Splinter Review |
Previous update to the SmsDatabaseService didnt migrate existing data, it also wrote new threads entries without an id
Assignee | ||
Updated•12 years ago
|
blocking-basecamp: --- → ?
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #684164 -
Flags: review?(anygregor)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → dale
Comment 2•12 years ago
|
||
Comment on attachment 684164 [details] [diff] [review] Populate most-recent table with existing sms data I don't think you can rely on highest message id means youngest message for a thread. You still need to compare the timestamp. I forward to bent since he wrote the mostRecentEntry code.
Attachment #684164 -
Flags: review?(anygregor) → review?(bent.mozilla)
Comment on attachment 684164 [details] [diff] [review] Populate most-recent table with existing sms data Review of attachment 684164 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/sms/src/ril/SmsDatabaseService.js @@ +335,5 @@ > + let contact = message.sender || message.receiver; > + > + if (contact in threads) { > + let thread = threads[contact]; > + threads[contact].id = message.id; Wait, this cursor goes backwards, so the message you're overwriting probably has a newer timestamp, right? @@ +476,5 @@ > } else { > event.target.source.add({ senderOrReceiver: number, > timestamp: message.timestamp, > body: message.body, > + id: meesage.id, Typo here ("meesage").
Assignee | ||
Comment 4•12 years ago
|
||
You are right, I think gwagner was right the first time and I would be best just comparing timestamps and not care about what order I traverse, will update tomorrow
Comment 5•12 years ago
|
||
I think this won't affect devices that are not already active (ie production devices) Please re-nom if we have that wrong.
blocking-basecamp: ? → -
Assignee | ||
Comment 6•12 years ago
|
||
Updated based on review. In theory this can affect anyone that is currently dogfooding, which would be a blocking+, I dont know enough about the sms app / api usage / deployed versions to know whether dogfooders will actually be affected by it. I am not.
Attachment #684164 -
Attachment is obsolete: true
Attachment #684164 -
Flags: review?(bent.mozilla)
Attachment #685137 -
Flags: review?(bent.mozilla)
Updated•12 years ago
|
Attachment #685137 -
Attachment is patch: true
Comment on attachment 685137 [details] [diff] [review] Populate most-recent table with existing sms data Review of attachment 685137 [details] [diff] [review]: ----------------------------------------------------------------- r=me with this one small change. ::: dom/sms/src/ril/SmsDatabaseService.js @@ +316,5 @@ > { keyPath: "senderOrReceiver" }); > objectStore.createIndex("timestamp", "timestamp"); > }, > > + upgradeSchema4: function upgradeSchema4(db, transaction) { Nit: No need for this to take 'db' argument, you never use it and we don't really have much of a pattern to follow.
Attachment #685137 -
Flags: review?(bent.mozilla) → review+
Dale, let's get this in so that Borja can land his SMS changes.
Assignee | ||
Comment 9•12 years ago
|
||
Nit addressed.
Attachment #685137 -
Attachment is obsolete: true
Attachment #686476 -
Flags: checkin?(bent.mozilla)
Comment on attachment 686476 [details] [diff] [review] Bug 814163 - Populate most-recent table with existing sms data https://hg.mozilla.org/integration/mozilla-inbound/rev/40d061793988
Attachment #686476 -
Flags: checkin?(bent.mozilla) → checkin+
Comment on attachment 686476 [details] [diff] [review] Bug 814163 - Populate most-recent table with existing sms data [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 809661 User impact if declined: Dogfood devices will soon display an empty thread list in the SMS app. Testing completed (on m-c, etc.): Dogfood Risk to taking this patch (and alternatives if risky): Must be done if users have existing data String or UUID changes made by this patch: None
Attachment #686476 -
Flags: approval-mozilla-beta?
Attachment #686476 -
Flags: approval-mozilla-aurora?
Comment 12•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/40d061793988
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 13•12 years ago
|
||
Comment on attachment 686476 [details] [diff] [review] Bug 814163 - Populate most-recent table with existing sms data In support of existing pre-release testers. Thanks for taking the time to fix Dale/all. If this causes new regressions for whatever reason, we'll cut/run and move on to other b-b+ bugs instead (we'll eat the data loss).
Attachment #686476 -
Flags: approval-mozilla-beta?
Attachment #686476 -
Flags: approval-mozilla-beta+
Attachment #686476 -
Flags: approval-mozilla-aurora?
Attachment #686476 -
Flags: approval-mozilla-aurora+
Comment 14•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/e49deed923d8 https://hg.mozilla.org/releases/mozilla-beta/rev/4077b03b8c26
(In reply to Ryan VanderMeulen from comment #14) > https://hg.mozilla.org/releases/mozilla-aurora/rev/e49deed923d8 > https://hg.mozilla.org/releases/mozilla-beta/rev/4077b03b8c26 Thanks Ryan!
You need to log in
before you can comment on or make changes to this bug.
Description
•