diff --git a/checkin_notes b/checkin_notes index f2e4ece5d5..569fe1ee93 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/doc/links.php b/doc/links.php index 671a8885c1..e0d44330a1 100644 --- a/doc/links.php +++ b/doc/links.php @@ -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"), diff --git a/sched/sched_array.C b/sched/sched_array.C index 86040c9c53..588e0b8974 100644 --- a/sched/sched_array.C +++ b/sched/sched_array.C @@ -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 --