Closed
Bug 892520
Opened 11 years ago
Closed 11 years ago
[Dialer] CallLog upgrade path error prone
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Tracking
(blocking-b2g:leo+, b2g18 fixed, b2g-v1.1hd fixed)
RESOLVED
FIXED
blocking-b2g | leo+ |
People
(Reporter: gerard-majax, Assigned: gerard-majax)
References
Details
Attachments
(1 file)
When investigating bug 887701 with :julienw, we saw that the Contacts DB has the same problem than the SMS DB: thanks to the asynchronous awesomeness of IndexedDB, we're running all upgrade paths concurrently. Hopefully nothing has bitten us yet (after all, we don't do migration on users' device yet), but this will. What we must do is having a recursive approach rather than an iterative approach, repetitively calling the upgrade function with currVersion when "this.result" is null in the cursor success handler. This needs to be leo+, otherwise we'll have migration hazard.
Assignee | ||
Comment 1•11 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #0) > When investigating bug 887701 with :julienw, we saw that the Contacts DB has ^^^^^^^^^^^ Call log, of course.
Assignee | ||
Comment 2•11 years ago
|
||
Please find a link to Github pull request https://github.com/mozilla-b2g/gaia/pull/10929
Attachment #774009 -
Flags: review?(ferjmoreno)
Attachment #774009 -
Flags: review?(etienne)
Assignee | ||
Updated•11 years ago
|
Attachment #774009 -
Flags: review?(ferjmoreno)
Attachment #774009 -
Flags: review?(etienne)
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 774009 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10929 Putting back r? now that the code has been successfully tested
Attachment #774009 -
Flags: review?(ferjmoreno)
Attachment #774009 -
Flags: review?(etienne)
Comment 4•11 years ago
|
||
Comment on attachment 774009 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10929 Thanks Alexandre! I am sorry, but I don't really see the point for this patch alone :|. The current upgrade path has not any asynchronous call that requires this kind of synchronization mechanism. I would suggest to add this code when the upgrade code actually requires it. In any case, I am not a peer of this code, so I'll let Etienne decide if this is required or not. I added a few comments to the PR though.
Attachment #774009 -
Flags: review?(ferjmoreno)
Comment 5•11 years ago
|
||
FWIW I don't think we have a strong case for leo+. I'm all in favor of setting up a safer approach for future database changes (what this patch does), but we can't argue that this is blocking since the current upgrade code works.
Comment 6•11 years ago
|
||
Comment on attachment 774009 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10929 :ferjm is definitely the best reviewer for this patch, happy to give feedback though :)
Attachment #774009 -
Flags: review?(etienne)
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Fernando Jiménez Moreno [:ferjm] (needinfo instead of CC, please) from comment #4) > Comment on attachment 774009 [details] > Link to Github https://github.com/mozilla-b2g/gaia/pull/10929 > > Thanks Alexandre! > > I am sorry, but I don't really see the point for this patch alone :|. The > current upgrade path has not any asynchronous call that requires this kind > of synchronization mechanism. > > I would suggest to add this code when the upgrade code actually requires it. > > In any case, I am not a peer of this code, so I'll let Etienne decide if > this is required or not. I added a few comments to the PR though. Okay, thanks for your feedback to both of you. I'll address the remarks next week, since it's not an urgent matter.
Comment 8•11 years ago
|
||
Going by comment #5 I don't think this is a blocker, also I am not aware on any user scenario where this has bitten us yet so the user impact is a bit unclear here.
blocking-b2g: leo? → -
Comment 9•11 years ago
|
||
The only asynchronous upgrade path is the last one so I agree this should not be leo+. However if we need to add a new upgrade path as part of leo+ for some reason we'll need to uplift this one as well. An uplift conflict should light up a warning if this happens :)
Assignee | ||
Comment 10•11 years ago
|
||
while finalizing bug 889245, we are now needing this.
blocking-b2g: - → leo?
Assignee | ||
Comment 11•11 years ago
|
||
Basically, current state of bug 889245 makes that we have two upgrades (v4 and v5) that needs to be performed for moving from 1.0.1 and 1.1 or master. The current code lets the cursors running in parallel, but I ran into issues while testing that were symptomatic of parallels cursors getting finished at different times. Symptom of this was that the call log upgrade was declared finished and yet the call log was empty: because the database was still under upgrade. Once you switched tab (all/missed) or that you kill/restart the dialer, it was okay, but upgrading this way might and will result in dataloss as bug 887701
Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 774009 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10929 Putting r? on this as agreed face to face, but this code will evolve not to be dependant on bug 889245.
Attachment #774009 -
Flags: review?(etienne)
Assignee | ||
Comment 13•11 years ago
|
||
Evolution has been performed.
Comment 14•11 years ago
|
||
Understood this block a blocker, what is the risk of this patch here given how close we are to 1.1 ?
Comment 15•11 years ago
|
||
The risk is to not use this patch.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → lissyx+mozillians
Comment 17•11 years ago
|
||
Comment on attachment 774009 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10929 All good! (commit a09494d). Thanks!
Attachment #774009 -
Flags: review?(etienne) → review+
Comment 18•11 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/d2856fd2d87c78e0f7b34c3a555cb8cd3a409aff
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 19•11 years ago
|
||
Uplifted d2856fd2d87c78e0f7b34c3a555cb8cd3a409aff to: v1-train: 3f5e92af9c34b2726d12b6db01b4ccd2b5da00de
status-b2g18:
--- → fixed
Comment 20•11 years ago
|
||
v1.1.0hd: 3f5e92af9c34b2726d12b6db01b4ccd2b5da00de
status-b2g-v1.1hd:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•