From 54d468cb78c7c3846d07265ec8f9f0a1f41375df Mon Sep 17 00:00:00 2001 From: "tim@chromium.org" Date: Fri, 1 Mar 2013 11:16:52 +0000 Subject: sync: Drop fully datatype throttled sync jobs rather than saving them. This avoids a bug where we loop infinitely with calls to RestartWaiting with a zero WaitInterval length, which happens in part because we don't honour ThrottledDatatypeTracker unthrottle times and rely on seperate exponential backoff treatment. BUG=177659 Review URL: https://chromiumcodereview.appspot.com/12386012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185528 0039d316-1c4b-4281-b951-d872f2087c98 --- sync/engine/sync_scheduler_impl.cc | 2 +- sync/engine/sync_scheduler_whitebox_unittest.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sync') diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc index 33e3fd5..c0014f3 100644 --- a/sync/engine/sync_scheduler_impl.cc +++ b/sync/engine/sync_scheduler_impl.cc @@ -429,7 +429,7 @@ SyncSchedulerImpl::JobProcessDecision SyncSchedulerImpl::DecideOnJob( // Note that there may already be such an event if we're in a WaitInterval, // so we can retry it then. if (!requested_types.Empty() && throttled_types.HasAll(requested_types)) - return SAVE; + return DROP; // TODO(tim): Don't drop. http://crbug.com/177659 } if (wait_interval_.get()) diff --git a/sync/engine/sync_scheduler_whitebox_unittest.cc b/sync/engine/sync_scheduler_whitebox_unittest.cc index 383f17d..5a9d774 100644 --- a/sync/engine/sync_scheduler_whitebox_unittest.cc +++ b/sync/engine/sync_scheduler_whitebox_unittest.cc @@ -159,7 +159,8 @@ TEST_F(SyncSchedulerWhiteboxTest, SaveNudgeWhileTypeThrottled) { ConfigurationParams(), FROM_HERE); SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); - EXPECT_EQ(decision, SyncSchedulerImpl::SAVE); + // TODO(tim): This shouldn't drop. Bug 177659. + EXPECT_EQ(decision, SyncSchedulerImpl::DROP); } TEST_F(SyncSchedulerWhiteboxTest, ContinueNudge) { -- cgit v1.1