Closed Bug 1167014 Opened 9 years ago Closed 9 years ago

Appropriately ignore deleted history items

Categories

(Firefox for iOS :: Sync, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

Attachments

(1 file)

47 bytes, text/x-github-pull-request
nalexander
: review+
Details | Review
We ignore them in the UI right now because we blow away all of their visits, and we don't show unvisited sites. Great!

But for thoroughness, we should make two changes:

Firstly, SQLiteHistory.getFilteredSitesWithLimit should explicitly ignore deleted sites.

Secondly, SQLiteHistory.recordVisitedSite sets is_deleted to 0, but doesn't change the GUID.

This is an area of undefined behavior in Sync. For example, a user could:

1. Add some visits. A GUID is assigned.
2. Delete the history item.
3. Add some more visits. The GUID is preserved.
4. Sync.

or:

1. Add some visits. A GUID is assigned.
2. Sync.
3. Delete the history item.
4. Add some more visits. The GUID is preserved.
5. Sync.

Same user action, different end state: in the former, only the visits added in (3) escape; in the latter, both sets of visits escape.

But what else can we do? We could switch GUIDs, but then the other clients will unify on URL, and *their* final behavior depends on the order in which they receive the records:

1. Deleted first, new GUID second: only new visits preserved.
2. New GUID first, deleted second: all visits preserved, because the deletion doesn't apply after the GUID remap.

We should think more about this.
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Attached file Pull req.
Tail-end of this PR.
Attachment #8608878 - Flags: review?(nalexander)
Comment on attachment 8608878 [details] [review]
Pull req.

wfm.
Attachment #8608878 - Flags: review?(nalexander) → review+
110264a
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: