diff --git a/checkin_notes b/checkin_notes index 0d664cc2f5..2ebe8dfefe 100755 --- a/checkin_notes +++ b/checkin_notes @@ -23213,3 +23213,13 @@ Rom 24 Jan 2005 scheduler_op.C lib/ error_numbers.h + +David 24 Jan 2005 + - Amend the above checkin so that a scheduler reply + is handled completely even if there's a delay request + + client/ + cs_scheduler.C + scheduler_op.C + lib/ + error_numbers.h diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index b2568a2821..fa8ed16195 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -521,12 +521,6 @@ int CLIENT_STATE::handle_scheduler_reply( show_message(project, buf, prio); } - if (sr.request_delay) { - double x = dtime() + sr.request_delay; - if (x > project->min_rpc_time) project->min_rpc_time = x; - return ERR_SERVER_REQ_DELAY; - } - // if project is down, return error (so that we back off) // and don't do anything else // @@ -779,6 +773,16 @@ int CLIENT_STATE::handle_scheduler_reply( project->send_file_list = true; } project->sched_rpc_pending = false; + + // handle delay request + // + if (sr.request_delay) { + double x = dtime() + sr.request_delay; + if (x > project->min_rpc_time) project->min_rpc_time = x; + } else { + project->min_rpc_time = 0; + } + set_client_state_dirty("handle_scheduler_reply"); scope_messages.printf("CLIENT_STATE::handle_scheduler_reply(): State after handle_scheduler_reply():\n"); print_summary(); diff --git a/client/scheduler_op.C b/client/scheduler_op.C index dbee907540..66d62a2d71 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -179,7 +179,15 @@ int SCHEDULER_OP::set_min_rpc_time(PROJECT* p) { return 0; } -// Back off contacting scheduler and output an error msg if needed +// One of the following errors occurred: +// - connection failure in fetching master file +// - connection failure in scheduler RPC +// - got master file, but it didn't have any elements +// - tried all schedulers, none responded +// - sent nonzero work request, got a reply with no work +// +// Back off contacting this project's schedulers, +// and output an error msg if needed // void SCHEDULER_OP::backoff(PROJECT* p, char *error_msg ) { msg_printf(p, MSG_ERROR, error_msg); @@ -493,16 +501,9 @@ bool SCHEDULER_OP::poll() { if (must_get_work && nresults==0) { backoff(project, "No work from project\n"); } else { - project->nrpc_failures = 0; - project->min_rpc_time = 0; + project->nrpc_errors = 0; } break; - case ERR_SERVER_REQ_DELAY: - // The server has requested a backoff of a specified - // amount, so lets honor it by not resetting the - // project->min_rpc_time value. - project->nrpc_failures = 0; - break; case ERR_PROJECT_DOWN: backoff(project, "Project is down"); break; diff --git a/lib/error_numbers.h b/lib/error_numbers.h index fb6209afc1..540bfe211f 100755 --- a/lib/error_numbers.h +++ b/lib/error_numbers.h @@ -143,6 +143,3 @@ #define ERR_NO_APP_VERSION -195 #define ERR_WU_USER_RULE -196 #define ERR_ABORTED_VIA_GUI -197 -#define ERR_SERVER_REQ_DELAY -198 - // The server has requested a delay, so don't - // modify min_rpc_time