Scheduler: refuse to upload results if DB item is

(1) over and (2) validate state init and (3) NOT file_delete==INIT.

(David, please bless addition of file_delete_state to SCHED_RESULT_ITEM.)

svn path=/trunk/boinc/; revision=10245
This commit is contained in:
Bruce Allen 2006-06-03 16:22:34 +00:00
parent 39e4ffc80b
commit 033c6719a5
4 changed files with 13 additions and 3 deletions

View File

@ -5423,6 +5423,10 @@ David 2 June 2006
Bruce 3 June 2006
- Transitioner: nasty bug in logging, wrong result id/name
- Scheduler: clearer logging for debugging purposes
- Scheduler: refuse to upload results if DB item is
(1) over and (2) validate state init and (3) NOT file_delete==INIT.
(David, please bless addition of file_delete_state to SCHED_RESULT_ITEM.)
db/
boinc_db.C
@ -5430,3 +5434,4 @@ Bruce 3 June 2006
sched/
handle_request.C
transitioner.C

View File

@ -1309,6 +1309,7 @@ void SCHED_RESULT_ITEM::parse(MYSQL_ROW& r) {
validate_state = atoi(r[i++]);
outcome = atoi(r[i++]);
client_state = atoi(r[i++]);
file_delete_state = atoi(r[i++]);
}
int DB_SCHED_RESULT_ITEM_SET::add_result(char* result_name) {
@ -1340,7 +1341,8 @@ int DB_SCHED_RESULT_ITEM_SET::enumerate() {
" received_time, "
" validate_state, "
" outcome, "
" client_state "
" client_state, "
" file_delete_state "
"FROM "
" result "
"WHERE "

View File

@ -678,6 +678,7 @@ struct SCHED_RESULT_ITEM {
char stderr_out[LARGE_BLOB_SIZE];
int app_version_num;
int exit_status;
int file_delete_state;
void clear();
void parse(MYSQL_ROW& row);

View File

@ -608,8 +608,8 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
}
log_messages.printf(
SCHED_MSG_LOG::MSG_NORMAL, "[HOST#%d] [RESULT#%d %s] got result (DB: server_state=%d outcome=%d client_state=%d validate_state=%d)\n",
reply.host.id, srip->id, srip->name, srip->server_state, srip->outcome, srip->client_state, srip->validate_state
SCHED_MSG_LOG::MSG_NORMAL, "[HOST#%d] [RESULT#%d %s] got result (DB: server_state=%d outcome=%d client_state=%d validate_state=%d delete_state=%d)\n",
reply.host.id, srip->id, srip->name, srip->server_state, srip->outcome, srip->client_state, srip->validate_state, srip->file_delete_state
);
// Do various sanity checks.
@ -640,6 +640,8 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
// not already been invoked.
if (srip->validate_state != VALIDATE_STATE_INIT) {
dont_replace_result = "result ALREADY reported as error, or canceled on server";
} else if (srip->file_delete_state != FILE_DELETE_INIT) {
dont_replace_result = "result ALREADY reported as error or canceled on server, and deleted";
}
break;
case RESULT_OUTCOME_NO_REPLY: