mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=6397
This commit is contained in:
parent
b848361a8e
commit
c1f7d8a890
|
@ -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
|
||||
|
|
|
@ -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; i<results.size(); i++) {
|
||||
if (i>0) 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);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,22 @@ list_start();
|
|||
list_heading_array(array(
|
||||
"Site", "Platforms", "Programs available"
|
||||
));
|
||||
list_item_array(array(
|
||||
"<a href=http://www.pperry.f2s.com/downloads.htm>SETI-Linux</a>",
|
||||
"Linux i686, linux athlon xp, Linux AMD64,
|
||||
Linux Pentium 2 and 3. Some Links to other Plattforms",
|
||||
"BOINC, SETI@home"
|
||||
));
|
||||
list_item_array(array(
|
||||
"<a href=http://www.guntec.de/Crunch3r>Mattias Pilch</a>",
|
||||
"Linux on DEC",
|
||||
"BOINC, SETI@home"
|
||||
));
|
||||
list_item_array(array(
|
||||
"<a href=http://www.kulthea.net/boinc/>SETI@Kulthea.net</a>",
|
||||
"Linux on Sparc",
|
||||
"BOINC, SETI@home"
|
||||
));
|
||||
list_item_array(array(
|
||||
"<a href=http://www.lb.shuttle.de/apastron/boincDown.shtml>Stefan Urbat</a>",
|
||||
"Solaris 10 AMD64 (Opteron) and x86
|
||||
|
|
|
@ -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; i<sreq.results.size(); i++) {
|
||||
|
@ -515,8 +513,6 @@ int handle_results(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
|||
//
|
||||
reply.result_acks.push_back(*rp);
|
||||
|
||||
// See if result was found in DB
|
||||
|
||||
retval = result_handler.lookup_result(rp->name, &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<result_handler.results.size(); i++) {
|
||||
// skip items that we previously marked to skip!
|
||||
if (result_handler.results[i].id > 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) {
|
||||
|
|
Loading…
Reference in New Issue