From c1f7d8a8901d273df6725ac2e5c349ce88f18635 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 22 Jun 2005 02:40:14 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=6397 --- checkin_notes | 10 ++++++++ db/boinc_db.C | 9 ++++++- doc/download_other.php | 16 ++++++++++++ sched/handle_request.C | 55 ++++++++++++++++++------------------------ 4 files changed, 57 insertions(+), 33 deletions(-) diff --git a/checkin_notes b/checkin_notes index 1a4888088d..8f8dfc4eef 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8191,3 +8191,13 @@ David 21 June 2005 clientgui/ MainWindow.cpp + +David 21 June 2005 + - scheduler: when handling results, if any of them fails the + sanity checks (e.g. it was already returned) + then don't update the transition time of the corresponding WU + + db/ + boinc_db.C + sched/ + handle_request.C diff --git a/db/boinc_db.C b/db/boinc_db.C index 33caa375cc..deba935072 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -1382,16 +1382,23 @@ int DB_SCHED_RESULT_ITEM_SET::update_result(SCHED_RESULT_ITEM& ri) { return retval; } +// set transition times of workunits - +// but only those corresponding to updated results +// (i.e. those that passed "sanity checks") +// int DB_SCHED_RESULT_ITEM_SET::update_workunits() { char query[MAX_QUERY_LEN], buf[256]; unsigned int i; + bool first= true; sprintf(query, "UPDATE workunit SET transition_time=%d WHERE id in (", (int)time(0) ); for (i=0; i0) strcat(query, ","); + if (results[i].id == 0) continue; // skip non-updated results + if (!first) strcat(query, ","); + first = false; sprintf(buf, "%d", results[i].workunitid); strcat(query, buf); } diff --git a/doc/download_other.php b/doc/download_other.php index 9007e63daf..80634e4602 100644 --- a/doc/download_other.php +++ b/doc/download_other.php @@ -22,6 +22,22 @@ list_start(); list_heading_array(array( "Site", "Platforms", "Programs available" )); +list_item_array(array( + "SETI-Linux", + "Linux i686, linux athlon xp, Linux AMD64, + Linux Pentium 2 and 3. Some Links to other Plattforms", + "BOINC, SETI@home" +)); +list_item_array(array( + "Mattias Pilch", + "Linux on DEC", + "BOINC, SETI@home" +)); +list_item_array(array( + "SETI@Kulthea.net", + "Linux on Sparc", + "BOINC, SETI@home" +)); list_item_array(array( "Stefan Urbat", "Solaris 10 AMD64 (Opteron) and x86 diff --git a/sched/handle_request.C b/sched/handle_request.C index 7073420d27..c498d08639 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -467,7 +467,7 @@ int handle_global_prefs(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { } -// New handle completed results +// handle completed results // int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { DB_SCHED_RESULT_ITEM_SET result_handler; @@ -484,14 +484,13 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { result_handler.add_result(sreq.results[i].name); } - // read results with those names from database - // Quantities that MUST be read from the DB are those - // where srip appears as an rval. + // read results from database into "result_handler". + // Quantities that must be read from the DB are those + // where srip (see below) appears as an rval. // These are: id, name, server_state, received_time, hostid. - // Quantities that must be WRITTEN to the DB are those for + // Quantities that must be written to the DB are those for // which srip appears as an lval. These are: - // hostid, - // teamid, received_time, client_state, cpu_time, exit_status, + // hostid, teamid, received_time, client_state, cpu_time, exit_status, // app_version_num, claimed_credit, server_state, stderr_out, // xml_doc_out, outcome, validate_state // @@ -504,7 +503,6 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { ); } - // loop over results reported by client // for (i=0; iname, &srip); if (retval) { log_messages.printf( @@ -532,12 +528,9 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { reply.host.id, srip->id, srip->name ); - // Comment -- In the sanity checks that follow, should we - // verify that the results validate_state is consistent with - // this being a newly arrived result? - // What happens if a workunit was canceled after a result was sent? - // When it gets back in, do we want to leave the validate state 'as is'? - // Probably yes, which is as the code currently behaves. + // Do various sanity checks. + // If one of them fails, set srip->id = 0, + // which suppresses the DB update later on // if (srip->server_state == RESULT_SERVER_STATE_UNSENT) { log_messages.printf( @@ -593,8 +586,7 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { } } // hostids do not match - // modify the result record in the in-memory copy obtained - // from the DB earlier. + // Modify the in-memory copy obtained from the DB earlier. // If we found a problem above, // we have continued and skipped this modify // @@ -641,8 +633,6 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { } // loop over all incoming results - // update all the results we have kept in memory, by storing to database. - // if (config.use_transactions) { retval = boinc_db.start_transaction(); if (retval) { @@ -653,22 +643,23 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { } } + // Update the result records + // (skip items that we previously marked to skip) + // for (i=0; i 0) { - retval = result_handler.update_result(result_handler.results[i]); - if (retval) { - log_messages.printf( - SCHED_MSG_LOG::CRITICAL, - "[HOST#%d] [RESULT#%d %s] can't update result: %s\n", - reply.host.id, result_handler.results[i].id, result_handler.results[i].name, - boinc_db.error_string() - ); - } + if (result_handler.results[i].id == 0) continue; + retval = result_handler.update_result(result_handler.results[i]); + if (retval) { + log_messages.printf( + SCHED_MSG_LOG::CRITICAL, + "[HOST#%d] [RESULT#%d %s] can't update result: %s\n", + reply.host.id, result_handler.results[i].id, + result_handler.results[i].name, boinc_db.error_string() + ); } } - // trigger the transition handle for the results' WUs + // set transition_time for the results' WUs // retval = result_handler.update_workunits(); if (retval) {