Closed Bug 1056943 Opened 10 years ago Closed 6 years ago

Remove contact images from call log DB

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: drs, Unassigned)

References

Details

(Whiteboard: [planned-sprint c=3])

In bug 1045499, we removed contact photos from the call log. We should remove them from the call log DB as well.
Whiteboard: [planned-sprint c=]
Target Milestone: 2.1 S4 (12sep) → 2.1 S5 (26sep)
Assignee: nobody → drs+bugzilla
Whiteboard: [planned-sprint c=] → [planned-sprint c=3]
Assignee: drs+bugzilla → anthony
OS: Mac OS X → All
Hardware: x86 → All
Status: NEW → ASSIGNED
I'm having some difficulties with IndexedDB migrations and getting this error when just trying to log all the records in the groups store:
"A mutation operation was attempted on a database that did not allow mutations."
I think we have an issue with our upgrade4. To re-populate the store, we need to query mozContacts. And that is async. So by the time we have all the information we wanted, the transaction given by upgradeneeded is closed. The current code opens a new one to store the new groups.

We haven't done any store or indexes change since upgrade4 but if we do, this will bite us because we're not in the transaction that can do that anymore.

Ben: Do you have any idea how we could avoid closing the upgradeneeded transaction while waiting for mozContacts results? See the upgrade code. Careful, it is ugly ugly code.

https://github.com/mozilla-b2g/gaia/blob/75df85cbcf0440a59602c01a65ece6aca61f6952/apps/communications/dialer/js/call_log_db.js#L280-L478
Flags: needinfo?(bent.mozilla)
Status: ASSIGNED → NEW
Unfortunately there's no way to keep a transaction open while other async code is running. Can you gather the data you need from mozcontacts before upgrading your database?
Flags: needinfo?(bent.mozilla)
I won't have time to work on this. I think the path forward here is to upgrade the reference-workload databases after upgrade4 and remove these bogus upgrades (since no end-user ever bought a phone before this upgrade).

Also, we can do a simpler patch that just stops recording photos in the DB. Because Call log eventually discards old entries, end-users will end up with a smaller DB without upgrades.

Needinfo-ing Doug to put this into a sprint.
Flags: needinfo?(drs+bugzilla)
Assignee: anthony → nobody
Flags: needinfo?(drs+bugzilla)
Target Milestone: 2.1 S5 (26sep) → 2.1 S7 (Oct24)
Target Milestone: 2.1 S7 (24Oct) → 2.1 S8 (7Nov)
Maybe this would fix bug 1085536 ?
Flags: needinfo?(drs.bugzilla)
Clearing needinfo since we found out that bug 1085536 is a dupe of bug 1087464.
Flags: needinfo?(drs.bugzilla)
Target Milestone: 2.1 S8 (7Nov) → ---
Depends on: 1107781
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.