*** empty log message ***

svn path=/trunk/boinc/; revision=5198
This commit is contained in:
David Anderson 2005-01-24 22:13:32 +00:00
parent be0bdab185
commit 0d6f6d66fb
4 changed files with 30 additions and 18 deletions

View File

@ -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

View File

@ -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();

View File

@ -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 <scheduler> 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;

View File

@ -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