author | Thom Chiovoloni <tchiovoloni@mozilla.com> |
Wed, 13 Jul 2016 12:18:34 -0400 | |
changeset 349617 | 47d39d542c7db01d1ef803508bc95307fd8a4638 |
parent 349616 | fff9d624dca283235c916d8769786e04f5622282 |
child 349618 | 19bf95d3e65ebebaa4d57984264c5f6a0788e190 |
push id | 6570 |
push user | raliiev@mozilla.com |
push date | Mon, 14 Nov 2016 12:26:13 +0000 |
treeherder | mozilla-beta@f455459b2ae5 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | markh, bsmedberg |
bugs | 1241699 |
milestone | 51.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
services/sync/modules/service.js | file | annotate | diff | comparison | revisions | |
toolkit/components/telemetry/Histograms.json | file | annotate | diff | comparison | revisions |
--- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -1503,55 +1503,61 @@ Sync11Service.prototype = { * @param collections [optional] * Array of collections to wipe. If not given, all collections are * wiped by issuing a DELETE request for `storageURL`. * * @return the server's timestamp of the (last) DELETE. */ wipeServer: function wipeServer(collections) { let response; + let histogram = Services.telemetry.getHistogramById("WEAVE_WIPE_SERVER_SUCCEEDED"); if (!collections) { // Strip the trailing slash. let res = this.resource(this.storageURL.slice(0, -1)); res.setHeader("X-Confirm-Delete", "1"); try { response = res.delete(); } catch (ex) { this._log.debug("Failed to wipe server", ex); + histogram.add(false); throw ex; } if (response.status != 200 && response.status != 404) { this._log.debug("Aborting wipeServer. Server responded with " + response.status + " response for " + this.storageURL); + histogram.add(false); throw response; } + histogram.add(true); return response.headers["x-weave-timestamp"]; } let timestamp; for (let name of collections) { let url = this.storageURL + name; try { response = this.resource(url).delete(); } catch (ex) { this._log.debug("Failed to wipe '" + name + "' collection", ex); + histogram.add(false); throw ex; } if (response.status != 200 && response.status != 404) { this._log.debug("Aborting wipeServer. Server responded with " + response.status + " response for " + url); + histogram.add(false); throw response; } if ("x-weave-timestamp" in response.headers) { timestamp = response.headers["x-weave-timestamp"]; } } - + histogram.add(true); return timestamp; }, /** * Wipe all local user data. * * @param engines [optional] * Array of engine names to wipe. If not given, all engines are used.
--- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -7834,16 +7834,23 @@ }, "WEAVE_COMPLETE_SUCCESS_COUNT": { "expires_in_version": "default", "kind": "exponential", "high": 1000, "n_buckets": 10, "description": "The number of times a sync successfully completed in this session" }, + "WEAVE_WIPE_SERVER_SUCCEEDED": { + "expires_in_version": "55", + "alert_emails": ["fx-team@mozilla.com"], + "kind": "boolean", + "bug_numbers": [1241699], + "description": "Stores 1 if a wipeServer call succeeded, and 0 if it failed." + }, "WEBCRYPTO_EXTRACTABLE_IMPORT": { "expires_in_version": "never", "kind": "boolean", "description": "Whether an imported key was marked as extractable" }, "WEBCRYPTO_EXTRACTABLE_GENERATE": { "expires_in_version": "never", "kind": "boolean",