Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c8a42dd authored by Matthew Williams's avatar Matthew Williams
Browse files

Don't back-off ALREADY_IN_PROGRESS syncs

BUG: 16219182
The issue is that some adapters get into a bad state where
SyncManager assumes them complete yet they are still going. This
result in ALREADY_IN_PROGRESS coming back from the adapter, the
default retry-time for which is about 10s.
Subject ALREADY_IN_PROGRESS to exponential back-off to avoid waking
up SM every ~10 seconds

Change-Id: I6cef787366436c678bac762ec6daf6212f04badc
parent ad3fc407
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2757,9 +2757,7 @@ public class SyncManager {
                } else {
                    Log.d(TAG, "failed sync operation " + syncOperation + ", " + syncResult);
                    // the operation failed so increase the backoff time
                    if (!syncResult.syncAlreadyInProgress) {
                    increaseBackoffSetting(syncOperation);
                    }
                    // reschedule the sync if so indicated by the syncResult
                    maybeRescheduleSync(syncResult, syncOperation);
                    historyMessage = ContentResolver.syncErrorToString(