Record why a bookmark merge was interrupted
Categories
(Firefox :: Sync, task, P3)
Tracking
()
People
(Reporter: lina, Assigned: lina)
Details
Attachments
(1 file)
When a bookmark merge is interrupted—either because of an Async.Watchdog
firing for a long-running merge, the bookmarks engine being disabled, or shutdown—the mirror checks the abort signal, and throws an InterruptedError
. InterruptedError
doesn't report the cause, so we know what operation was interrupted, but not why.
It looks like AbortSignal
and Error
have new ways to bubble up the cause now, so let's take advantage of them. I think this will give us more visibility in telemetry about how frequently merges are interrupted, and why.
Assignee | ||
Comment 1•9 months ago
|
||
This change takes advantage of two new language features:
AbortController::abort()
now takes an optional reason, and exposes
that reason viaAbortSignal::reason
(bug 1737771).- The
Error
constructor now takes a newcause
option, which it
sets on the error (bug 1679653).
SyncedBookmarksMirror
now aborts in-progress merges at shutdown with
a FinalizedError
, and Async.Watchdog
aborts with either a
TimeoutError
or a ShutdownError
. The mirror propagates these errors
as the cause of all InterruptedError
s.
SyncTelemetry.transformError
unwraps these causes, so that we can
record why a merge was interrupted, not just the specific operation
that was interrupted.
These error causes are "unwrapped" in the , so we
can see why a merge was interrupted.
Description
•