From e82d9d87a90bae7caadbfd704d3d5ae9bf2a9dda Mon Sep 17 00:00:00 2001 From: Bernd Machenschalk Date: Thu, 25 Aug 2016 13:03:08 +0200 Subject: [PATCH] Validator: implement "suspicious" results A validator now has the possibility to mark a single result as "suspicious" by making init_result() return VAL_RESULT_SUSPICIOUS. If this is the single quorum result of an adaptive replication, this will trigger another task to be generated for validation. --- sched/validate_util2.cpp | 11 +++++++++++ sched/validate_util2.h | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/sched/validate_util2.cpp b/sched/validate_util2.cpp index 5b012692ee..02b0db606f 100644 --- a/sched/validate_util2.cpp +++ b/sched/validate_util2.cpp @@ -80,6 +80,7 @@ int check_set( had_error[i] = false; } int good_results = 0; + int suspicious_results = 0; for (i=0; i 1 || good_results > 0) { + good_results += suspicious_results; + } + if (good_results < wu.min_quorum) goto cleanup; // Compare results diff --git a/sched/validate_util2.h b/sched/validate_util2.h index 9c6fa95883..3003286ecf 100644 --- a/sched/validate_util2.h +++ b/sched/validate_util2.h @@ -18,6 +18,9 @@ #ifndef _VALIDATE_UTIL2_ #define _VALIDATE_UTIL2_ +// return value of init_result if an "adaptive replication" result looks suspicious +#define VAL_RESULT_SUSPICIOUS 1 + #include #include "boinc_db_types.h" @@ -31,4 +34,5 @@ extern int check_set( DB_ID_TYPE& canonicalid, double& credit_deprecated, bool& retry ); extern void check_pair(RESULT& r1, RESULT& r2, bool& retry); + #endif