From 5c8cdc39576342b0572c778847c711cd08c86cb8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 14 Mar 2012 06:56:48 +0000 Subject: [PATCH] - scheduler: do homogeneous app version check before rereading WU as well as after. svn path=/trunk/boinc/; revision=25419 --- checkin_notes | 7 +++++++ sched/sched_send.cpp | 18 +++++++++++++++++- sched/sched_send.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 40ca9c813e..1018e9ba4d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2600,3 +2600,10 @@ Charlie 12 Mar 2012 samples/vboxwrapper/ vboxwrapper.xcodeproj project.pbxproj + +David 13 Mar 2012 + - scheduler: do homogeneous app version check before rereading WU + as well as after. + + sched/ + sched_send.cpp,h diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index 91d2dea22b..64fd8f66c0 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -727,7 +727,8 @@ int wu_is_infeasible_fast( } // homogeneous redundancy: can't send if app uses HR and - // 1) host is of unknown HR class + // 1) host is of unknown HR class, or + // 2) WU is already committed to different HR class // if (app_hr_type(app)) { if (hr_unknown_class(g_reply->host, app_hr_type(app))) { @@ -750,6 +751,21 @@ int wu_is_infeasible_fast( } } + // homogeneous app version + // + if (app.homogeneous_app_version) { + int avid = wu.app_version_id; + if (avid && bav.avp->id != avid) { + if (config.debug_send) { + log_messages.printf(MSG_NORMAL, + "[send] [HOST#%d] [WU#%d %s] failed homogeneous app version check: %d %d\n", + g_reply->host.id, wu.id, wu.name, avid, bav.avp->id + ); + } + return INFEASIBLE_HAV; + } + } + if (config.one_result_per_user_per_wu || config.one_result_per_host_per_wu) { if (wu_already_in_reply(wu)) { return INFEASIBLE_DUP; diff --git a/sched/sched_send.h b/sched/sched_send.h index abdc5fb97b..02756c0890 100644 --- a/sched/sched_send.h +++ b/sched/sched_send.h @@ -49,6 +49,7 @@ extern bool app_core_compatible(WORK_REQ& wreq, APP_VERSION& av); #define INFEASIBLE_BANDWIDTH 9 #define INFEASIBLE_CUSTOM 10 #define INFEASIBLE_USER_FILTER 11 +#define INFEASIBLE_HAV 12 extern int wu_is_infeasible_fast( WORKUNIT&,