diff --git a/checkin_notes b/checkin_notes index 0fa688e1f4..510f9ac697 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9497,3 +9497,14 @@ David 12 Oct 2007 api/ boinc_api.C + +David 15 Oct 2007 + - client: fix bug where delay request from project is ignored + if no results are returned. + Also, made the "Deferred" messages conditional on sched_op_debug + Fixes #430 (from Rattledagger) + + client/ + cs_scheduler.C + scheduler_op.C + work_fetch.C diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 29fdccd6d3..4ec3ce05ee 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -822,22 +822,20 @@ int CLIENT_STATE::handle_scheduler_reply( } // if we asked for work and didn't get any, - // back off this project + // treat it as an RPC failure; back off this project // if (project->work_request && nresults==0) { scheduler_op->backoff(project, "no work from project\n"); } else { project->nrpc_failures = 0; + project->min_rpc_time = 0; + } - // handle delay request - // - if (sr.request_delay) { - double x = now + sr.request_delay; - project->set_min_rpc_time(x, "requested by project"); - } else { - project->min_rpc_time = 0; - } - + // handle delay request from project + // + if (sr.request_delay) { + double x = now + sr.request_delay; + project->set_min_rpc_time(x, "requested by project"); } if (sr.next_rpc_delay) { diff --git a/client/scheduler_op.C b/client/scheduler_op.C index 8326f8a169..af90181833 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -104,9 +104,8 @@ int SCHEDULER_OP::init_op_project(PROJECT* p, int r) { reason = r; if (log_flags.sched_op_debug) { - msg_printf(0, MSG_INFO, - "[sched_op_debug] SCHEDULER_OP::init_op_project(): starting op for %s\n", - p->master_url + msg_printf(p, MSG_INFO, + "[sched_op_debug] Starting scheduler request" ); } @@ -282,10 +281,7 @@ int SCHEDULER_OP::init_master_fetch(PROJECT* p) { get_master_filename(*p, master_filename, sizeof(master_filename)); if (log_flags.sched_op_debug) { - msg_printf(0, MSG_INFO, - "[sched_op_debug] SCHEDULER_OP::init_master_fetch(): Fetching master file for %s\n", - p->master_url - ); + 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); @@ -343,8 +339,8 @@ int SCHEDULER_OP::parse_master_file(PROJECT* p, vector &urls) { } fclose(f); if (log_flags.sched_op_debug) { - msg_printf(0, MSG_INFO, - "[sched_op_debug] SCHEDULER_OP::parse_master_file(): got %d scheduler URLs\n", + msg_printf(p, MSG_INFO, + "[sched_op_debug] Found %d scheduler URLs in master file\n", (int)urls.size() ); } @@ -404,9 +400,8 @@ bool SCHEDULER_OP::poll() { gstate.set_client_state_dirty("master URL fetch done"); if (http_op.http_op_retval == 0) { if (log_flags.sched_op_debug) { - msg_printf(0, MSG_INFO, - "[sched_op_debug] SCHEDULER_OP::poll(): Got master file from %s; parsing", - cur_proj->master_url + msg_printf(cur_proj, MSG_INFO, + "[sched_op_debug] Got master file; parsing" ); } retval = parse_master_file(cur_proj, urls); diff --git a/client/work_fetch.C b/client/work_fetch.C index 1fb1611dd6..fb2fda6c31 100644 --- a/client/work_fetch.C +++ b/client/work_fetch.C @@ -102,11 +102,13 @@ void PROJECT::set_min_rpc_time(double future_time, const char* reason) { if (future_time > min_rpc_time) { min_rpc_time = future_time; possibly_backed_off = true; - msg_printf(this, MSG_INFO, - "Deferring communication for %s", - timediff_format(min_rpc_time - gstate.now).c_str() - ); - msg_printf(this, MSG_INFO, "Reason: %s\n", reason); + if (log_flags.sched_op_debug) { + msg_printf(this, MSG_INFO, + "[sched_op_debug] Deferring communication for %s", + timediff_format(min_rpc_time - gstate.now).c_str() + ); + msg_printf(this, MSG_INFO, "[sched_op_debug] Reason: %s\n", reason); + } } }