scheduler buglet

svn path=/trunk/boinc/; revision=9172
This commit is contained in:
David Anderson 2006-01-05 07:37:51 +00:00
parent 0e3f5dda43
commit b6ec685ca4
3 changed files with 23 additions and 5 deletions

View File

@ -51,3 +51,14 @@ David 4 Jan 2006
handle_request.C
tools/
backend_lib.C
David 4 Jan 2006
- scheduler: scan_work_array(): if add_result_to_reply() fails, do NOT
reinsert the entry in the array by resetting the "present" flag.
We previously cleared this flag,
so the array entry may have been refilled by the feeder,
and it might be in the CHECKED_OUT state.
(from Paul Buck)
sched/
sched_array.C

View File

@ -77,6 +77,7 @@ language("Dutch", array(
site("http://www.boinc.be", "www.boinc.be"),
));
language("English", array(
site("http://theclangers.net/", "The Clangers"),
site("http://www.free-dc.org/", "Free-DC"),
site("http://forums.anandtech.com/categories.aspx?catid=39&entercat=y", "TeAm Anandtech"),
site("http://www.boinc-australia.net", "BOINC@Australia"),

View File

@ -180,7 +180,8 @@ void scan_work_array(
wu_result.state = WR_STATE_EMPTY;
// reread result from DB, make sure it's still unsent
// TODO: from here to update() should be a transaction
// TODO: from here to add_result_to_reply()
// (which updates the DB record) should be a transaction
//
retval = result.lookup_id(result.id);
if (retval) {
@ -205,13 +206,18 @@ void scan_work_array(
goto done;
}
// ****** HERE WE'VE COMMITTED TO SENDING THIS RESULT TO HOST ******
//
retval = add_result_to_reply(
result, wu, sreq, reply, platform, app, avp
);
if (!retval) goto done;
// add_result_to_reply() fails only in fairly pathological cases -
// e.g. we couldn't update the DB record or modify XML fields.
// If this happens, don't replace the record in the array
// (we can't anyway, since we marked the entry as "empty").
// The feeder will eventually pick it up again,
// and hopefully the problem won't happen twice.
//
goto done;
dont_send:
// here we couldn't send the result for some reason --