Closed Bug 1119078 Opened 5 years ago Closed 5 years ago

Don't attempt to fetch a sync migration sentinel if we are using the FxA identity

Categories

(Firefox :: Sync, defect)

defect
Not set
Points:
1

Tracking

()

RESOLVED FIXED
mozilla37
Iteration:
37.3 - 12 Jan

People

(Reporter: markh, Assigned: markh)

Details

Attachments

(1 file)

Currently we attempt to fetch a migration sentinel even if we are configured for FxA.  No such sentinel will exist or is necessary in that case, so we should avoid the network round-trip.
Attachment #8545595 - Flags: review?(rnewman)
Flags: qe-verify-
Flags: firefox-backlog+
Comment on attachment 8545595 [details] [diff] [review]
0003-Bug-XXXXXXX-only-pre-fetch-the-sync-migration-sentin.patch

Review of attachment 8545595 [details] [diff] [review]:
-----------------------------------------------------------------

::: services/sync/modules/identity.js
@@ +451,5 @@
> +   * identity.  Called after every sync and is really just an optimization that
> +   * allows us to avoid a network request for when we actually need the
> +   * migration info.
> +   */
> +  prefetchMigrationSentinel: function prefetchMigrationSentinel(service) {

No need for the name.

@@ +454,5 @@
> +   */
> +  prefetchMigrationSentinel: function prefetchMigrationSentinel(service) {
> +    // Try and fetch the migration sentinel - it will end up in the recordManager
> +    // cache.
> +    service.recordManager.get(service.storageURL + "meta/fxa_credentials");

This seems like it might arbitrarily throw, so a try block would be good so service.js doesn't have to worry.

::: services/sync/modules/service.js
@@ +1286,2 @@
>        // If we have no clusterURL, we are probably doing a node reassignment
> +      // do don't attempt to get it in that case.

s/do/so
Attachment #8545595 - Flags: review?(rnewman) → review+
Iteration: --- → 37.3 - 12 Jan
https://hg.mozilla.org/mozilla-central/rev/a405fef5be03
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
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.