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

Issue 3275006: AU: Implement server-dictated poll interval. (Closed)

Created:
10 years, 3 months ago by petkov
Modified:
9 years, 7 months ago
Reviewers:
adlr
CC:
chromium-os-reviews_chromium.org, petkov, adlr
Visibility:
Public.

Description

AU: Implement server-dictated poll interval. The server will need to include a PollInterval XML attribute in its update check response. The requested interval is in seconds. BUG=5984 TEST=unit tests, gmerged on device and tested with a modified dev server Change-Id: I89d13f9f85d93bc141b74ae677cca813e3364fb5

Patch Set 1 #

Patch Set 2 : add logging #

Patch Set 3 : include order #

Total comments: 6

Patch Set 4 : rebase to head #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -22 lines) Patch
M omaha_request_action.h View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M omaha_request_action.cc View 3 chunks +9 lines, -6 lines 0 comments Download
M update_attempter.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M update_attempter.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M update_check_scheduler.h View 2 chunks +7 lines, -0 lines 0 comments Download
M update_check_scheduler.cc View 1 2 chunks +17 lines, -11 lines 0 comments Download
M update_check_scheduler_unittest.cc View 1 2 3 2 chunks +32 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
petkov
10 years, 3 months ago (2010-08-30 23:56:13 UTC) #1
adlr
LGTM w/ nits http://codereview.chromium.org/3275006/diff/4001/5001 File omaha_request_action.cc (right): http://codereview.chromium.org/3275006/diff/4001/5001#newcode384 omaha_request_action.cc:384: &output_object.poll_interval); should there be some sanity ...
10 years, 3 months ago (2010-09-01 02:51:52 UTC) #2
petkov
10 years, 3 months ago (2010-09-01 06:02:20 UTC) #3
See responses below. If you don't object, I'll push tomorrow morning.

http://codereview.chromium.org/3275006/diff/4001/5001
File omaha_request_action.cc (right):

http://codereview.chromium.org/3275006/diff/4001/5001#newcode384
omaha_request_action.cc:384: &output_object.poll_interval);
On 2010/09/01 02:51:52, adlr wrote:
> should there be some sanity checks here? like in the range [60 seconds, 1
week]?

I thought it's best to transfer it as-is to the scheduler. The scheduler will
limit it to a reasonable range.

http://codereview.chromium.org/3275006/diff/4001/5005
File update_check_scheduler.cc (right):

http://codereview.chromium.org/3275006/diff/4001/5005#newcode97
update_check_scheduler.cc:97: LOG(WARNING) << "Using server-dictated poll
interval: " << interval;
On 2010/09/01 02:51:52, adlr wrote:
> should we have a minimum?

We do. See below -- if it's less than our regular periodic interval, we use the
periodic interval instead.

http://codereview.chromium.org/3275006/diff/4001/5005#newcode98
update_check_scheduler.cc:98: } else if (update_attempter_->http_response_code()
== 500 ||
On 2010/09/01 02:51:52, adlr wrote:
> should we treat all 5xx as error? (not jut 500/503)

I've done what the rate limit site suggests -- 500/503 for sure, and 502 with
the caveat that you have to be sure the code comes from the update server rather
than from a proxy. 502 needs more investigation.

I'd say let's leave it as is and consider extending it if we run into issues.

Powered by Google App Engine
This is Rietveld 408576698