Closed Bug 1384207 Opened 8 years ago Closed 8 years ago

AllTables includes attached metadata tables

Categories

(Firefox for iOS :: Data Storage, enhancement, P1)

All
iOS
enhancement

Tracking

()

RESOLVED WONTFIX
Iteration:
1.26
Tracking Status
fxios 8.1+ ---

People

(Reporter: rnewman, Assigned: justindarc)

Details

(Whiteboard: [MobileCore][DataLoss])

Attachments

(1 file)

BrowserTable.AllTables lists all the tables that are meant to be in the DB. AllIndices and AllViews are similar. It's used for two purposes: 1. In BrowserTable.drop. 2. In BrowserTable.exists, which is used to check whether the DB is complete. At the point in which we run (2), the metadata DB _isn't yet attached_. That means our update check always fails, and we move on to an update: 2017-07-25 10:32:24.188 [Debug] [BrowserDB.swift:549] tablesExist > 15 tables exist. Expected 17 2017-07-25 10:32:24.188 [Debug] [BrowserDB.swift:135] updateTable(_:table:) > Trying update BROWSER version 26 2017-07-25 10:32:24.189 [Debug] [BrowserDB.swift:209] createOrUpdate > Table BROWSER already exists. This is all kinds of backwards. We should not be managing attached tables in BrowserTable, or we should be ensuring that attached databases are attached _immediately_ after opening, before doing anything with the schema. Consequences of this: - Logspam and excess work. - General difficulty in figuring out what state the system will be in. - Potentially, we will do the check in the log above, and _not update the metadata DB schema_. That could be bad.
btw, this is on a clean first run.
Assignee: nobody → jdarcangelo
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [MobileCore]
Iteration: --- → 1.26
Attached file GitHub Pull Request
Attachment #8889978 - Flags: review?(rnewman)
Comment on attachment 8889978 [details] [review] GitHub Pull Request r+ with manual testing.
Attachment #8889978 - Flags: review?(rnewman) → review+
Marking this as WONTFIX since we'll be getting rid of the attached metadata.db in Bug 1384278.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Whiteboard: [MobileCore] → [MobileCore][DataLoss]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: