- client: fix bug where master fetch failure doesn't clear request flag,

leading to infinite retry without backoff

svn path=/trunk/boinc/; revision=17269
This commit is contained in:
David Anderson 2009-02-14 00:05:02 +00:00
parent 1e63d3af04
commit 2afd98ae70
5 changed files with 32 additions and 14 deletions

View File

@ -1574,3 +1574,10 @@ David 13 Feb 2009
clientgui/
DlgAdvPreferences.cpp
DlgAdvPreferencesBase.cpp,h
David 13 Feb 2009
- client: fix bug where master fetch failure doesn't clear request flag,
leading to infinite retry without backoff
client/
scheduler_op.cpp,h

View File

@ -186,8 +186,8 @@ void SCHEDULER_OP::backoff(PROJECT* p, const char *reason_msg) {
// keep trying (subject to backoff); otherwise give up
// (the results_dur, need_work, and trickle_up cases will be retriggered)
//
void SCHEDULER_OP::rpc_failed() {
backoff(cur_proj, "scheduler request failed");
void SCHEDULER_OP::rpc_failed(const char* msg) {
backoff(cur_proj, msg);
switch (cur_proj->sched_rpc_pending) {
case RPC_REASON_INIT:
case RPC_REASON_PROJECT_REQ:
@ -257,7 +257,7 @@ int SCHEDULER_OP::start_rpc(PROJECT* p) {
"Scheduler request failed: %s", boincerror(retval)
);
}
rpc_failed();
rpc_failed("Scheduler request initialization failed");
return retval;
}
http_ops->insert(&http_op);
@ -278,10 +278,18 @@ int SCHEDULER_OP::init_master_fetch(PROJECT* p) {
msg_printf(p, MSG_INFO, "[sched_op_debug] Fetching master file");
}
http_op.set_proxy(&gstate.proxy_info);
retval = http_op.init_get(p->master_url, master_filename, true);
if (retval) return retval;
http_ops->insert(&http_op);
cur_proj = p;
retval = http_op.init_get(p->master_url, master_filename, true);
if (retval) {
if (log_flags.sched_ops) {
msg_printf(p, MSG_INFO,
"Master file fetch failed: %s", boincerror(retval)
);
}
rpc_failed("Master file fetch initialization failed");
return retval;
}
http_ops->insert(&http_op);
state = SCHEDULER_OP_STATE_GET_MASTER;
return 0;
}
@ -403,7 +411,7 @@ bool SCHEDULER_OP::poll() {
// master file parse failed.
//
cur_proj->master_fetch_failures++;
backoff(cur_proj, "Couldn't parse scheduler list");
rpc_failed("Couldn't parse scheduler list");
} else {
// parse succeeded
//
@ -426,7 +434,7 @@ bool SCHEDULER_OP::poll() {
boincerror(http_op.http_op_retval)
);
cur_proj->master_fetch_failures++;
backoff(cur_proj, buf);
rpc_failed("Master file request failed");
}
gstate.request_work_fetch("Master fetch complete");
cur_proj = NULL;
@ -458,7 +466,7 @@ bool SCHEDULER_OP::poll() {
if (!retval) return true;
}
if (url_index == (int) cur_proj->scheduler_urls.size()) {
rpc_failed();
rpc_failed("Scheduler request failed");
}
} else {
retval = gstate.handle_scheduler_reply(cur_proj, scheduler_url);

View File

@ -83,7 +83,7 @@ private:
bool update_urls(PROJECT*, std::vector<std::string> &urls);
int start_op(PROJECT*);
int start_rpc(PROJECT*);
void rpc_failed();
void rpc_failed(const char*);
int parse_master_file(PROJECT*, std::vector<std::string>&);
};

View File

@ -1,6 +1,9 @@
<?
$project_news = array(
array("February 13, 2009",
"A <a href=http://event.twgrid.org/isgc2009/asiaathome/>workshop on volunteer computing</a> will take place 16-17 April 2009 at the Academia Sinica in Taipei, Taiwan, in conjunction with the International Symposium on Grid Computing."
),
array("February 3, 2009",
"Congratulations to <a href=http://www.setibr.org/>SETIBR</a>,
the Brazilian team which,

View File

@ -97,10 +97,10 @@ $stats_sites = array(
"The Knights Who Say 'Ni' stats",
""
),
array("http://www.teamocuk.com/",
"Team OcUK stats",
""
),
// array("http://www.teamocuk.com/",
// "Team OcUK stats",
// ""
// ),
);
$team_stats_sites = array(