diff --git a/checkin_notes b/checkin_notes index d88d567b41..2a1feb7788 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 + diff --git a/db/boinc_db.C b/db/boinc_db.C index 4378af286c..40900a40e1 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -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 " diff --git a/db/boinc_db.h b/db/boinc_db.h index caa1793955..6521993118 100755 --- a/db/boinc_db.h +++ b/db/boinc_db.h @@ -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); diff --git a/sched/handle_request.C b/sched/handle_request.C index 30a8ec4c04..0a72e7a666 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -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: