From cf3fc6576671eb427ecd7cfea87bf6c163fb0d33 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Fri, 19 Mar 2010 11:35:01 -0700 Subject: [PATCH] Bug 551874 - Figure out if we can avoid getting into partial synced state [r=mconnor] For not-mobile clients, sync everything by specifying Infinity to keep existing math/logic working. Don't add a limit ?query if it's Infinity. --- services/sync/modules/base_records/collection.js | 2 +- services/sync/modules/engines.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/sync/modules/base_records/collection.js b/services/sync/modules/base_records/collection.js index e59e67e73a69..35d8f7d2f775 100644 --- a/services/sync/modules/base_records/collection.js +++ b/services/sync/modules/base_records/collection.js @@ -75,7 +75,7 @@ Collection.prototype = { args.push('sort=' + this.sort); if (this.ids != null) args.push("ids=" + this.ids); - if (this.limit > 0) + if (this.limit > 0 && this.limit != Infinity) args.push("limit=" + this.limit); this.uri.query = (args.length > 0)? '?' + args.join('&') : ''; diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index e65c6ca40aec..b44ab22c6e32 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -406,7 +406,7 @@ SyncEngine.prototype = { this._log.trace("Downloading & applying server changes"); // Figure out how many total items to fetch this sync; do less on mobile - let fetchNum = 1500; + let fetchNum = Infinity; if (Svc.Prefs.get("client.type") == "mobile") fetchNum = 50;