mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=6399
This commit is contained in:
parent
31659992b4
commit
213f2b1d1a
|
@ -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
|
||||
|
|
|
@ -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$";
|
||||
|
|
|
@ -508,11 +508,6 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
|||
for (i=0; i<sreq.results.size(); i++) {
|
||||
rp = &sreq.results[i];
|
||||
|
||||
// acknowledge the result even if we couldn't find it in DB --
|
||||
// don't want it to keep coming back
|
||||
//
|
||||
reply.result_acks.push_back(*rp);
|
||||
|
||||
retval = result_handler.lookup_result(rp->name, &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<result_handler.results.size(); i++) {
|
||||
if (result_handler.results[i].id == 0) continue;
|
||||
retval = result_handler.update_result(result_handler.results[i]);
|
||||
SCHED_RESULT_ITEM& sri = result_handler.results[i];
|
||||
if (sri.id == 0) continue;
|
||||
retval = result_handler.update_result(sri);
|
||||
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()
|
||||
reply.host.id, sri.id, sri.name, boinc_db.error_string()
|
||||
);
|
||||
} else {
|
||||
reply.result_acks.push_back(std::string(sri.name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -460,7 +460,7 @@ int SCHEDULER_REPLY::write(FILE* fout) {
|
|||
"<result_ack>\n"
|
||||
" <name>%s</name>\n"
|
||||
"</result_ack>\n",
|
||||
result_acks[i].name
|
||||
result_acks[i].c_str()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ struct SCHEDULER_REPLY {
|
|||
std::vector<APP_VERSION> app_versions;
|
||||
std::vector<WORKUNIT>wus;
|
||||
std::vector<RESULT>results;
|
||||
std::vector<RESULT>result_acks;
|
||||
std::vector<std::string>result_acks;
|
||||
std::vector<MSG_TO_HOST>msgs_to_host;
|
||||
std::vector<FILE_INFO>file_deletes;
|
||||
char code_sign_key[4096];
|
||||
|
|
Loading…
Reference in New Issue