Chromium Code Reviews
Description[Sync] Sync client should to exponential backoff when receive partial failure.
BUG=656072
Before this CL, Sync will throttle the data types in
error_data_type_ids, which is wrong, Sync should exponential backoff
those data type.
This CL also fix several bugs.
1. When Sync client receive error THROTTLED, and error_data_type_ids is set,
Sync client will throttle those datatypes, and also throttle whole client.
This is wrong, the whole client should not get throttled in this case.
To fix this, when this case happened, SyncerProtoUtil::PostClientToServerMessage
will throttled the data types, and return PARTIAL_FAILURE instead of THROTTLED.
2. |scheduled_nudge_time_| in SyncSchedulerImpl is not update correctly,
so Sync client will sync less frequently than expected.
To fix this, I delete |scheduled_nudge_time_| and get the time directly from
|global_wakeup_timer_| (previously pending_wakeup_timer_).
3. When Sync client received PARTIAL_FAILURE, not only the data type in
error_data_type_ids got throttled, the whole client got exponential backoff.
To fix this, add an early return in SyncSchedulerImpl::HandleFailure when
receive PARTIAL_FAILURE.
Committed: https://crrev.com/dcb17ac181e0c58d3bee7fece41e712df434f904
Cr-Commit-Position: refs/heads/master@{#432255}
Patch Set 1 : review by self #
Total comments: 18
Patch Set 2 : code review #
Total comments: 12
Patch Set 3 : fix backoff problem #
Total comments: 9
Patch Set 4 : add test #
Total comments: 12
Patch Set 5 : code review #
Total comments: 2
Patch Set 6 : update comments #Patch Set 7 : rebase #Messages
Total messages: 70 (54 generated)
|