diff --git a/checkin_notes b/checkin_notes index a7e2bda0c3..47d2440eda 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8211,3 +8211,16 @@ David 21 June 2005 client/ cs_scheduler.C + +David 21 June 2005 + - scheduler: don't send acks for results for which DB update failed + (from Ian Hay) + - change result_acks vector from RESULT to std::string + - scheduler: fix workunit update query empty case + (from Bruce Allen) + + db/ + boinc_db.C + sched/ + handle_request.C + server_types.C,h diff --git a/db/boinc_db.C b/db/boinc_db.C index deba935072..b37f155f32 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -1403,7 +1403,11 @@ int DB_SCHED_RESULT_ITEM_SET::update_workunits() { strcat(query, buf); } strcat(query, ")"); - return db->do_query(query); + if (first) { + return 0; + } else { + return db->do_query(query); + } } const char *BOINC_RCSID_ac374386c8 = "$Id$"; diff --git a/sched/handle_request.C b/sched/handle_request.C index 0138f752dc..9cdafbf384 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -508,11 +508,6 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { for (i=0; iname, &srip); if (retval) { log_messages.printf( @@ -520,6 +515,7 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { "[HOST#%d] [RESULT#? %s] can't find result\n", reply.host.id, rp->name ); + reply.result_acks.push_back(std::string(rp->name)); continue; } @@ -539,6 +535,7 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { reply.host.id, srip->id, srip->name, srip->server_state ); srip->id=0; // mark to skip when updating DB + reply.result_acks.push_back(std::string(rp->name)); continue; } @@ -549,6 +546,7 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { reply.host.id, srip->id, srip->name ); srip->id=0; // mark to skip when updating DB + reply.result_acks.push_back(std::string(rp->name)); continue; } @@ -568,6 +566,7 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { srip->id, srip->name, srip->hostid ); srip->id=0; // mark to skip when updating DB + reply.result_acks.push_back(std::string(rp->name)); continue; } else if (result_host.userid != reply.host.userid) { log_messages.printf( @@ -576,6 +575,7 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { reply.host.userid, reply.host.id, srip->id, srip->name, result_host.userid ); srip->id=0; // mark to skip when updating DB + reply.result_acks.push_back(std::string(rp->name)); continue; } else { log_messages.printf( @@ -649,15 +649,17 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) { // (skip items that we previously marked to skip) // for (i=0; i\n" " %s\n" "\n", - result_acks[i].name + result_acks[i].c_str() ); } diff --git a/sched/server_types.h b/sched/server_types.h index 7fa63b4745..1240835b54 100644 --- a/sched/server_types.h +++ b/sched/server_types.h @@ -178,7 +178,7 @@ struct SCHEDULER_REPLY { std::vector app_versions; std::vectorwus; std::vectorresults; - std::vectorresult_acks; + std::vectorresult_acks; std::vectormsgs_to_host; std::vectorfile_deletes; char code_sign_key[4096];