Closed Bug 568721 Opened 15 years ago Closed 13 years ago

Handle onClearHistory notifications correctly

Categories

(Firefox :: Sync, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 578694

People

(Reporter: mevans, Unassigned)

References

Details

Steps: 1. go to History->Show All History 2. select durations with many entries > 30 3. select all pages but one and delete them 4. sync data into cloud 5. go to other instance and sync down history changes Expected results: The history on both computers show the deletion of the history Actual results: The deletion of the pages isn't synced on the other computer Note: Individual page deletions, do indeed work and are synced properly
Summary: block history deletes are not being synced → batch history deletes are not being synced
Keywords: relnote
is this because of how bug https://bugzilla.mozilla.org/show_bug.cgi?id=518945 handles history deletion?
Utterly unrelated, we don't even process the items. Pretty sure it's that we don't get the same notifications from the backend.
Target Milestone: --- → 2.0
Blocks: 580755
Flagging in-testsuite for further investigation
Flags: in-testsuite?
So... is there a reason we don't get notifications here? IIRC it was >10...
You won't be notified about individual entries being deleted, but you should be getting start and end notifications about the batch.
And that is a bug, just to be clear. We are not notifying single changes during batches, but the right behavior should be that UI listeners don't listen during batches. Any other listener will have an hard time finding what changed.
Target Milestone: 2.0 → ---
Severity: normal → major
Priority: -- → P5
Actually, now we notify each change, on batch you may want to avoid doing some work or accumulating changes, but you are not losing anymore history removals. The only situation we don't notify single removals is onClearHistory, in such a case you just get the onClearHistory notification.
According to Marco's last comment, this shouldn't be an issue any more? Tempted to mark WORKSFORME, but I'd like verification.
Whiteboard: [needs-verification]
so, manually deleting a dozen or so history items from the Library correctly syncs. But I if I go to Tools > Clear Recent History and select Everything, the deletes don't sync.
We have a history observer that does nothing for batch starts and ends, and thus should get each individual item deletion, right? My suspicion is that Places is calling onDeleteURI during batches, and we're only processing onBeforeDeleteURI, which is not called. mak, could you confirm?
if you clear everything the only notification you get is onClearHistory.
Sync's only action in onClearHistory is to bump the score… but it doesn't track any of the changed IDs, nor receive any notifications for individual items, so it won't upload any deletions. We could either: * Query for every ID during onClearHistory and track them all, and allow sync to occur as normal * Act as if we're generating a reset event for the history collection, and tell other clients to wipe themselves. Which we do depends on whether we think of clearing history as something that should affect other clients' history that hasn't yet synced, or something that should only affect the records on this machine. (And efficiency, too; I'm not super excited about POSTing up 80,000 deleted records.)
OS: Mac OS X → All
Priority: P5 → P3
Hardware: x86 → All
Summary: batch history deletes are not being synced → Handle onClearHistory notifications correctly
Tidying up some metadata… Bug 578694 describes my second course of action from Comment 14, so duping to that.
No longer blocks: 580755
Status: NEW → RESOLVED
Closed: 13 years ago
Keywords: relnote
Priority: P3 → P2
Resolution: --- → DUPLICATE
Whiteboard: [needs-verification]
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.