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

Unified Diff: components/sync/engine_impl/get_updates_processor.cc

Issue 2475043002: [Sync] Sync client should to exponential backoff when receive partial failure (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync/engine_impl/get_updates_processor.cc
diff --git a/components/sync/engine_impl/get_updates_processor.cc b/components/sync/engine_impl/get_updates_processor.cc
index 3dc9cb5ca2ab8f78cac05d8fc9e897c9f5932558..943f4cd1d52aeea21b54a03c245985708f271797 100644
--- a/components/sync/engine_impl/get_updates_processor.cc
+++ b/components/sync/engine_impl/get_updates_processor.cc
@@ -76,9 +76,9 @@ void PartitionUpdatesByType(const sync_pb::GetUpdatesResponse& gu_response,
TypeSyncEntityMap::iterator it = updates_by_type->find(type);
if (it == updates_by_type->end()) {
- DLOG(WARNING)
- << "Received update for unexpected type or the type is throttled:"
- << ModelTypeToString(type);
+ DLOG(WARNING) << "Received update for unexpected type, or the type is "
+ "throttled or failed with partial failure:"
+ << ModelTypeToString(type);
continue;
}
@@ -227,9 +227,11 @@ SyncerError GetUpdatesProcessor::ExecuteDownloadUpdates(
DVLOG(2) << SyncerProtoUtil::ClientToServerResponseDebugString(
update_response);
- if (result == SERVER_RETURN_PARTIAL_FAILURE) {
+ if (!partial_failure_data_types.Empty()) {
request_types->RemoveAll(partial_failure_data_types);
- } else if (result != SYNCER_OK) {
+ }
+
+ if (result != SYNCER_OK) {
GetUpdatesResponseEvent response_event(base::Time::Now(), update_response,
result);
cycle->SendProtocolEvent(response_event);
« no previous file with comments | « components/sync/engine_impl/get_updates_delegate.cc ('k') | components/sync/engine_impl/sync_engine_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698