From e82d9d87a90bae7caadbfd704d3d5ae9bf2a9dda Mon Sep 17 00:00:00 2001 From: Bernd Machenschalk Date: Thu, 25 Aug 2016 13:03:08 +0200 Subject: [PATCH 1/2] 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 From 998a9279563389678d3584bfe82eea5d9bb1c062 Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Tue, 30 Aug 2016 16:50:16 +0200 Subject: [PATCH 2/2] Validator: log suspicious results --- sched/validate_util2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sched/validate_util2.cpp b/sched/validate_util2.cpp index 02b0db606f..5e1ab83c41 100644 --- a/sched/validate_util2.cpp +++ b/sched/validate_util2.cpp @@ -91,6 +91,10 @@ int check_set( retry = true; had_error[i] = true; } else if (retval == VAL_RESULT_SUSPICIOUS) { + log_messages.printf(MSG_NORMAL, + "[RESULT#%lu %s] considered to be suspicious\n", + results[i].id, results[i].name + ); suspicious_results++; } else if (retval) { log_messages.printf(MSG_CRITICAL,