Commit 12e51880 authored by Robert Kaplow's avatar Robert Kaplow Committed by Commit Bot

Increase the UMA/UKM retry backoff levels to reduce server load on server issues.

This should change retries from

15s, 16.5s, ... 10min, 10min ..

to

5 minutes, 10 minutes, 20 minutes, ... 24h, 24h..


Bug: 873282
Change-Id: Ib1e3fdebdf155f171a51c73b29724f4ba4673c73
Reviewed-on: https://chromium-review.googlesource.com/1171512
Commit-Queue: Robert Kaplow (slow) <rkaplow@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582735}
parent a62bd679
...@@ -21,10 +21,10 @@ namespace { ...@@ -21,10 +21,10 @@ namespace {
// longer before sending the next log. This backoff process helps reduce load // longer before sending the next log. This backoff process helps reduce load
// on a server that is having issues. // on a server that is having issues.
// The following is the multiplier we use to expand that inter-log duration. // The following is the multiplier we use to expand that inter-log duration.
const double kBackoffMultiplier = 1.1; const double kBackoffMultiplier = 2;
// The maximum backoff interval in minutes. // The maximum backoff interval in hours.
const int kMaxBackoffIntervalMinutes = 10; const int kMaxBackoffIntervalHours = 24;
// Minutes to wait if we are unable to upload due to data usage cap. // Minutes to wait if we are unable to upload due to data usage cap.
const int kOverDataUsageIntervalMinutes = 5; const int kOverDataUsageIntervalMinutes = 5;
...@@ -37,7 +37,7 @@ base::TimeDelta BackOffUploadInterval(base::TimeDelta interval) { ...@@ -37,7 +37,7 @@ base::TimeDelta BackOffUploadInterval(base::TimeDelta interval) {
kBackoffMultiplier * interval.InMicroseconds())); kBackoffMultiplier * interval.InMicroseconds()));
base::TimeDelta max_interval = base::TimeDelta max_interval =
base::TimeDelta::FromMinutes(kMaxBackoffIntervalMinutes); base::TimeDelta::FromHours(kMaxBackoffIntervalHours);
if (interval > max_interval || interval.InSeconds() < 0) { if (interval > max_interval || interval.InSeconds() < 0) {
interval = max_interval; interval = max_interval;
} }
...@@ -51,9 +51,9 @@ base::TimeDelta GetUnsentLogsInterval() { ...@@ -51,9 +51,9 @@ base::TimeDelta GetUnsentLogsInterval() {
return base::TimeDelta::FromSeconds(3); return base::TimeDelta::FromSeconds(3);
} }
// Inital time delay after a log uploaded fails before retrying it. // Initial time delay after a log uploaded fails before retrying it.
base::TimeDelta GetInitialBackoffInterval() { base::TimeDelta GetInitialBackoffInterval() {
return base::TimeDelta::FromSeconds(15); return base::TimeDelta::FromMinutes(5);
} }
} // namespace } // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment