Merge change Iaa7edda4 into eclair
* changes: don't reschedule syncs that failed with a tooManyRetries error
This commit is contained in:
@@ -919,12 +919,16 @@ class SyncManager implements OnAccountsUpdateListener {
|
|||||||
+ previousSyncOperation);
|
+ previousSyncOperation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If this sync aborted because the internal sync loop retried too many times then
|
||||||
|
// don't reschedule. Otherwise we risk getting into a retry loop.
|
||||||
// If the operation succeeded to some extent then retry immediately.
|
// If the operation succeeded to some extent then retry immediately.
|
||||||
// If this was a two-way sync then retry soft errors with an exponential backoff.
|
// If this was a two-way sync then retry soft errors with an exponential backoff.
|
||||||
// If this was an upward sync then schedule a two-way sync immediately.
|
// If this was an upward sync then schedule a two-way sync immediately.
|
||||||
// Otherwise do not reschedule.
|
// Otherwise do not reschedule.
|
||||||
|
if (syncResult.tooManyRetries) {
|
||||||
if (syncResult.madeSomeProgress()) {
|
Log.d(TAG, "not retrying sync operation because it retried too many times: "
|
||||||
|
+ previousSyncOperation);
|
||||||
|
} else if (syncResult.madeSomeProgress()) {
|
||||||
if (isLoggable) {
|
if (isLoggable) {
|
||||||
Log.d(TAG, "retrying sync operation immediately because "
|
Log.d(TAG, "retrying sync operation immediately because "
|
||||||
+ "even though it had an error it achieved some success");
|
+ "even though it had an error it achieved some success");
|
||||||
|
|||||||
Reference in New Issue
Block a user