Closed
Bug 1253439
Opened 8 years ago
Closed 8 years ago
FOREIGN KEY constraint failed when un-syncing bookmarks when not fully merged
Categories
(Firefox for iOS :: Sync, defect)
Tracking
()
RESOLVED
FIXED
4.0
People
(Reporter: rnewman, Assigned: rnewman)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Sync partially rooted bookmarks. Uncheck bookmarks on desktop. Sync. Sync device. Resetting fails: 2016-03-03 14:54:36.141 [Debug] [Downloader.swift:56] resetDownloaderWithPrefs(_:collection:) > Resetting downloader prefs profile.sync.synchronizer.history..downloader.history... Previous values: Optional(1457045078280), Optional(1456868212789). 2016-03-03 14:54:36.150 [Warning] [BrowserDB.swift:410] run > SQL operation failed: Abort due to constraint violation FOREIGN KEY constraint failed 2016-03-03 14:54:36.150 [Debug] [SwiftData.swift:165] transaction(synchronous:transactionClosure:) > Op in transaction failed. Rolling back. 2016-03-03 14:54:36.169 [Debug] [Downloader.swift:56] resetDownloaderWithPrefs(_:collection:) > Resetting downloader prefs profile.sync.synchronizer.bookmarks..downloader.bookmarks... Previous values: Optional(1456280063000), Optional(1456280062999).
Assignee | ||
Comment 1•8 years ago
|
||
Perhaps something bad with my test profile's data; a full merge fails at the end with 2016-03-03 14:57:18.373 [Debug] [SQLiteBookmarksSyncing.swift:344] deleteStructureForGUIDs(_:fromTable:connection:withMaxVars:) > Deleting 84 parents from bookmarksMirrorStructure. 2016-03-03 14:57:18.383 [Debug] [SQLiteBookmarksSyncing.swift:372] insertStructureIntoTable(_:connection:children:maxVars:) > Inserting 333 records (out of 1727). 2016-03-03 14:57:18.388 [Debug] [SQLiteBookmarksSyncing.swift:372] insertStructureIntoTable(_:connection:children:maxVars:) > Inserting 333 records (out of 1727). 2016-03-03 14:57:18.394 [Debug] [SQLiteBookmarksSyncing.swift:372] insertStructureIntoTable(_:connection:children:maxVars:) > Inserting 333 records (out of 1727). 2016-03-03 14:57:18.402 [Debug] [SQLiteBookmarksSyncing.swift:372] insertStructureIntoTable(_:connection:children:maxVars:) > Inserting 333 records (out of 1727). 2016-03-03 14:57:18.408 [Debug] [SQLiteBookmarksSyncing.swift:372] insertStructureIntoTable(_:connection:children:maxVars:) > Inserting 333 records (out of 1727). 2016-03-03 14:57:18.414 [Debug] [SQLiteBookmarksSyncing.swift:372] insertStructureIntoTable(_:connection:children:maxVars:) > Inserting 62 records (out of 1727). 2016-03-03 14:57:18.418 [Error] [SwiftData.swift:160] transaction(synchronous:transactionClosure:) > COMMIT failed. Rolling back. 2016-03-03 14:57:18.418 [Warning] [SQLiteBookmarksSyncing.swift:1088] applyLocalOverrideCompletionOp(_:itemSources:) > Got error “Abort due to constraint violation FOREIGN KEY constraint failed”
Assignee | ||
Comment 2•8 years ago
|
||
The array form of db.run runs all queries in a single transaction. That fixes the first issue. I also tested the mirror->local flattening, and found some oddities. The second commit should prevent those from occurring.
Attachment #8726473 -
Flags: review?(nalexander)
Attachment #8726473 -
Flags: review?(bnicholson)
Comment 3•8 years ago
|
||
Comment on attachment 8726473 [details] [review] Pull req. lgtm. It's *eventually* consistent, I'm sure :)
Attachment #8726473 -
Flags: review?(nalexander) → review+
Assignee | ||
Comment 4•8 years ago
|
||
8ac1d04
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-fxios-v3.0:
--- → affected
status-fxios-v4.0:
--- → fixed
Resolution: --- → FIXED
Whiteboard: [needsuplift]
Target Milestone: --- → 4.0
Updated•8 years ago
|
Attachment #8726473 -
Flags: review?(bnicholson)
You need to log in
before you can comment on or make changes to this bug.
Description
•