From de6540cbc0d4de9fd1fdf802b731ebc37bb86e0d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 22 May 2014 23:54:56 -0700 Subject: [PATCH] scheduler: if a result was aborted by user, don't count it as an error --- db/boinc_db.cpp | 4 +++- db/boinc_db.h | 1 + sched/transitioner.cpp | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/db/boinc_db.cpp b/db/boinc_db.cpp index 4c65dc2d36..1e3276872d 100644 --- a/db/boinc_db.cpp +++ b/db/boinc_db.cpp @@ -1494,6 +1494,7 @@ void TRANSITIONER_ITEM::parse(MYSQL_ROW& r) { res_hostid = safe_atoi(r[i++]); res_received_time = safe_atoi(r[i++]); res_app_version_id = safe_atoi(r[i++]); + res_exit_status = safe_atoi(r[i++]); } int DB_TRANSITIONER_ITEM_SET::enumerate( @@ -1551,7 +1552,8 @@ int DB_TRANSITIONER_ITEM_SET::enumerate( " res.sent_time, " " res.hostid, " " res.received_time, " - " res.app_version_id " + " res.app_version_id, " + " res.exit_status " "FROM " " workunit AS wu " " LEFT JOIN result AS res ON wu.id = res.workunitid " diff --git a/db/boinc_db.h b/db/boinc_db.h index 1e0e0e1f99..eb969ca9b3 100644 --- a/db/boinc_db.h +++ b/db/boinc_db.h @@ -67,6 +67,7 @@ struct TRANSITIONER_ITEM { int res_hostid; int res_received_time; int res_app_version_id; + int res_exit_status; void clear(); void parse(MYSQL_ROW&); diff --git a/sched/transitioner.cpp b/sched/transitioner.cpp index afea870b61..55591ac3d2 100644 --- a/sched/transitioner.cpp +++ b/sched/transitioner.cpp @@ -296,6 +296,14 @@ int handle_wu( } break; case RESULT_OUTCOME_CLIENT_ERROR: + // is user aborted job, don't count it as an error + // + if (res_item.res_exit_status == EXIT_ABORTED_VIA_GUI) { + nno_reply++; + } else { + nerrors++; + } + break; case RESULT_OUTCOME_VALIDATE_ERROR: nerrors++; break;