DescriptionAvoid 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 #
Messages
Total messages: 15 (0 generated)
|