From 45ac7021c29e4b9ef165af54a8c66d44899102dd Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Fri, 29 Oct 2021 11:55:37 -0300 Subject: [PATCH] do not requeue nodes for testing from failing queue if we do not have them marked as failing anymore --- ...odes-for-testing-from-failing-queue-.patch | 23 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 24 insertions(+) create mode 100644 debian/patches/0002-do-not-requeue-nodes-for-testing-from-failing-queue-.patch diff --git a/debian/patches/0002-do-not-requeue-nodes-for-testing-from-failing-queue-.patch b/debian/patches/0002-do-not-requeue-nodes-for-testing-from-failing-queue-.patch new file mode 100644 index 000000000..19e8a0d42 --- /dev/null +++ b/debian/patches/0002-do-not-requeue-nodes-for-testing-from-failing-queue-.patch @@ -0,0 +1,23 @@ +From: Jeff Becker +Date: Fri, 29 Oct 2021 10:45:02 -0400 +Subject: do not requeue nodes for testing from failing queue if we do not + have them marked as failing anymore + +--- + llarp/consensus/reachability_testing.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/llarp/consensus/reachability_testing.cpp b/llarp/consensus/reachability_testing.cpp +index 99190bc..36281d4 100644 +--- a/llarp/consensus/reachability_testing.cpp ++++ b/llarp/consensus/reachability_testing.cpp +@@ -124,7 +124,8 @@ namespace llarp::consensus + auto& [pk, retest_time, failures] = failing_queue.top(); + if (retest_time > now) + break; +- result.emplace_back(pk, failures); ++ if (failing.count(pk)) ++ result.emplace_back(pk, failures); + failing_queue.pop(); + } + return result; diff --git a/debian/patches/series b/debian/patches/series index 38a9e7a4f..01a321645 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0007-Pass-debian-version-as-GIT_VERSION.patch +0002-do-not-requeue-nodes-for-testing-from-failing-queue-.patch