diff --git a/checkin_notes b/checkin_notes index 9e10c650c2..0436f65d98 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4127,3 +4127,12 @@ David 3 June 2012 html/inc/ util.inc util_ops.inc + +David 4 June 2012 + - scheduler: if we truncate the # of results accepted + (like we're doing in SETI@home) + don't resend lost results since we don't know what they are + + sched/ + handle_request.cpp + sched_types.cpp,h diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp index d0ba4870a1..afdcb538fe 100644 --- a/sched/handle_request.cpp +++ b/sched/handle_request.cpp @@ -1274,6 +1274,7 @@ void process_request(char* code_sign_key) { if (g_request->have_other_results_list) { if (ok_to_send_work && (config.resend_lost_results || g_wreq->resend_lost_results) + && !g_request->results_truncated ) { if (resend_lost_work()) { ok_to_send_work = false; diff --git a/sched/sched_types.cpp b/sched/sched_types.cpp index 2c705959a5..16314dc115 100644 --- a/sched/sched_types.cpp +++ b/sched/sched_types.cpp @@ -1,6 +1,6 @@ // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2012 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -205,6 +205,7 @@ const char* SCHEDULER_REQUEST::parse(XML_PARSER& xp) { client_cap_plan_class = false; sandbox = -1; allow_multiple_clients = -1; + results_truncated = false; if (xp.get_tag()) { return "xp.get_tag() failed"; @@ -330,6 +331,7 @@ const char* SCHEDULER_REQUEST::parse(XML_PARSER& xp) { } #if 0 // enable if you need to limit CGI memory size if (results.size() >= 1024) { + results_truncated = true; continue; } #endif diff --git a/sched/sched_types.h b/sched/sched_types.h index 6dbe357ca1..17d8e03bc4 100644 --- a/sched/sched_types.h +++ b/sched/sched_types.h @@ -303,6 +303,10 @@ struct SCHEDULER_REQUEST { COPROCS coprocs; std::vector results; // completed results being reported + bool results_truncated; + // set if (to limit memory usage) we capped this size of "results" + // In this case, don't resend lost results + // since we don't know what was lost. std::vector file_xfer_results; std::vector msgs_from_host; std::vector file_infos;