From 2afd98ae700b5ae1ada2123cf3746ca75485a390 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 14 Feb 2009 00:05:02 +0000 Subject: [PATCH] - client: fix bug where master fetch failure doesn't clear request flag, leading to infinite retry without backoff svn path=/trunk/boinc/; revision=17269 --- checkin_notes | 7 +++++++ client/scheduler_op.cpp | 26 +++++++++++++++++--------- client/scheduler_op.h | 2 +- doc/boinc_news.php | 3 +++ html/inc/stats_sites.inc | 8 ++++---- 5 files changed, 32 insertions(+), 14 deletions(-) diff --git a/checkin_notes b/checkin_notes index f744008002..d089297278 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/client/scheduler_op.cpp b/client/scheduler_op.cpp index 91c66bdc74..08d0c17248 100644 --- a/client/scheduler_op.cpp +++ b/client/scheduler_op.cpp @@ -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); diff --git a/client/scheduler_op.h b/client/scheduler_op.h index e39e5c1dfe..901c3eef19 100644 --- a/client/scheduler_op.h +++ b/client/scheduler_op.h @@ -83,7 +83,7 @@ private: bool update_urls(PROJECT*, std::vector &urls); int start_op(PROJECT*); int start_rpc(PROJECT*); - void rpc_failed(); + void rpc_failed(const char*); int parse_master_file(PROJECT*, std::vector&); }; diff --git a/doc/boinc_news.php b/doc/boinc_news.php index 4981bb41e1..5fa325582b 100644 --- a/doc/boinc_news.php +++ b/doc/boinc_news.php @@ -1,6 +1,9 @@ workshop on volunteer computing 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 SETIBR, the Brazilian team which, diff --git a/html/inc/stats_sites.inc b/html/inc/stats_sites.inc index 5499912171..064e01a888 100644 --- a/html/inc/stats_sites.inc +++ b/html/inc/stats_sites.inc @@ -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(