Remove contact images from call log DB

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
4 years ago
9 months ago

People

(Reporter: drs, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

4 years ago
In bug 1045499, we removed contact photos from the call log. We should remove them from the call log DB as well.
Blocks: 1036516
(Reporter)

Updated

4 years ago
Whiteboard: [planned-sprint c=]
(Reporter)

Updated

4 years ago
Target Milestone: 2.1 S4 (12sep) → 2.1 S5 (26sep)
(Reporter)

Updated

4 years ago
Assignee: nobody → drs+bugzilla
Whiteboard: [planned-sprint c=] → [planned-sprint c=3]
(Reporter)

Updated

4 years ago
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
(Reporter)

Updated

4 years ago
Flags: needinfo?(drs+bugzilla)
Target Milestone: 2.1 S5 (26sep) → 2.1 S7 (Oct24)
(Reporter)

Updated

4 years ago
Target Milestone: 2.1 S7 (24Oct) → 2.1 S8 (7Nov)
Maybe this would fix bug 1085536 ?
Flags: needinfo?(drs.bugzilla)
(Reporter)

Comment 6

4 years ago
Clearing needinfo since we found out that bug 1085536 is a dupe of bug 1087464.
Flags: needinfo?(drs.bugzilla)
(Reporter)

Updated

4 years ago
Target Milestone: 2.1 S8 (7Nov) → ---
(Reporter)

Updated

4 years ago
Depends on: 1107781

Comment 7

9 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.