Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 9185031: Avoid SYNC_CYCLE_CONTINUATION sync cycles (Closed)

Created:
8 years, 11 months ago by rlarocque
Modified:
8 years, 11 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin
Visibility:
Public.

Description

Avoid SYNC_CYCLE_CONTINUATION sync cycles This is part 3 of 3 in a series of patches to remove the unnecessary SYNC_CYCLE_CONTINUATION sync cycle that follows every commit. Previously, we would schedule a SYNC_CYCLE_CONTINUATION sync cycle to retry in case of failure if we detected that the number of unsynced handles was greater than zero by the time the current sync cycle was complete. That value was stale; it was updated only at the beginning of the sync cycle and did not take into account the fact that many handles may have been committed during the cycle. Every cycle that started with at least one uncommitted item would result in an extra SYNC_CYCLE_CONTINUATION (and GetUpdates request to the server) being performed. The new logic attempts to perform SYNC_CYCLE_CONTINUATION sync cycles only when necessary. The logic is based on the idea that we should only retry if we detect a failure. Parts 1 and 2 in this patch series provide a mechanism for detecting failures. This patch makes it so we schedule another sync cycle only if that code detects a failure. Note that the logic being used here does not distinguish between transient an non-transient errors. We could optimize this code by not retrying unless we have reason to believe a retry would be a sensible response to this kind of error. However, the old code did not attempt to handle different errors differently, so we won't either. The exponential backoff in SyncScheduler should ensure this doesn't cause any serious problems. BUG=94670 TEST=Manual. Trigger sync for a Zipit data type with about:sync open. Note 'Empty GetUpdates' counter is not incremented with each change. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=118572

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebase #

Patch Set 3 : Attempt to fix integration tests #

Patch Set 4 : Rebase + minor changes #

Total comments: 10

Patch Set 5 : Add TODOs #

Patch Set 6 : fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -37 lines) Patch
M chrome/browser/sync/engine/sync_scheduler.cc View 1 2 chunks +8 lines, -18 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/sessions/test_util.cc View 1 chunk +4 lines, -11 lines 0 comments Download
M chrome/browser/sync/test/integration/enable_disable_test.cc View 1 2 3 4 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/sync/test/integration/migration_errors_test.cc View 1 2 3 4 5 1 chunk +10 lines, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
rlarocque
Here is the last patch in the series. Parts 1 and 2 are at http://codereview.chromium.org/9113024/ ...
8 years, 11 months ago (2012-01-11 22:37:36 UTC) #1
rlarocque
On 2012/01/11 22:37:36, rlarocque wrote: > Here is the last patch in the series. > ...
8 years, 11 months ago (2012-01-11 23:01:52 UTC) #2
tim (not reviewing)
On 2012/01/11 23:01:52, rlarocque wrote: > On 2012/01/11 22:37:36, rlarocque wrote: > > Here is ...
8 years, 11 months ago (2012-01-12 01:36:59 UTC) #3
tim (not reviewing)
lgtm http://codereview.chromium.org/9185031/diff/1/chrome/browser/sync/engine/sync_scheduler.cc File chrome/browser/sync/engine/sync_scheduler.cc (left): http://codereview.chromium.org/9185031/diff/1/chrome/browser/sync/engine/sync_scheduler.cc#oldcode859 chrome/browser/sync/engine/sync_scheduler.cc:859: // TODO(tim): Old impl had special code if ...
8 years, 11 months ago (2012-01-12 01:42:31 UTC) #4
rlarocque
http://codereview.chromium.org/9185031/diff/1/chrome/browser/sync/engine/sync_scheduler.cc File chrome/browser/sync/engine/sync_scheduler.cc (left): http://codereview.chromium.org/9185031/diff/1/chrome/browser/sync/engine/sync_scheduler.cc#oldcode859 chrome/browser/sync/engine/sync_scheduler.cc:859: // TODO(tim): Old impl had special code if notifications ...
8 years, 11 months ago (2012-01-12 19:43:33 UTC) #5
lipalani1
LGTM but i think there could be more test failures. if I remember right we ...
8 years, 11 months ago (2012-01-13 00:00:30 UTC) #6
rlarocque
+Fred As you can see, there were integration test failures. Some of these were due ...
8 years, 11 months ago (2012-01-20 06:45:13 UTC) #7
akalin
http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/test/integration/enable_disable_test.cc File chrome/browser/sync/test/integration/enable_disable_test.cc (right): http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/test/integration/enable_disable_test.cc#newcode46 chrome/browser/sync/test/integration/enable_disable_test.cc:46: DisableNotifications(); why was this necessary? i.e. why does setting ...
8 years, 11 months ago (2012-01-20 22:41:51 UTC) #8
rlarocque
http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/test/integration/enable_disable_test.cc File chrome/browser/sync/test/integration/enable_disable_test.cc (right): http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/test/integration/enable_disable_test.cc#newcode46 chrome/browser/sync/test/integration/enable_disable_test.cc:46: DisableNotifications(); On 2012/01/20 22:41:51, akalin wrote: > why was ...
8 years, 11 months ago (2012-01-20 23:04:56 UTC) #9
akalin
http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/test/integration/enable_disable_test.cc File chrome/browser/sync/test/integration/enable_disable_test.cc (right): http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/test/integration/enable_disable_test.cc#newcode46 chrome/browser/sync/test/integration/enable_disable_test.cc:46: DisableNotifications(); On 2012/01/20 23:04:56, rlarocque wrote: > On 2012/01/20 ...
8 years, 11 months ago (2012-01-20 23:07:24 UTC) #10
akalin
http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/profile_sync_service_harness.cc File chrome/browser/sync/profile_sync_service_harness.cc (right): http://codereview.chromium.org/9185031/diff/19001/chrome/browser/sync/profile_sync_service_harness.cc#newcode658 chrome/browser/sync/profile_sync_service_harness.cc:658: // rely on self-notifiations to ensure that timestamps are ...
8 years, 11 months ago (2012-01-20 23:09:29 UTC) #11
rlarocque
New patch uploaded. PTAL.
8 years, 11 months ago (2012-01-20 23:20:48 UTC) #12
akalin
LGTM
8 years, 11 months ago (2012-01-20 23:25:08 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9185031/22004
8 years, 11 months ago (2012-01-20 23:26:03 UTC) #14
commit-bot: I haz the power
8 years, 11 months ago (2012-01-21 00:53:18 UTC) #15
Change committed as 118572

Powered by Google App Engine
This is Rietveld 408576698