From d6cc35bcf057163d55bb3d03ea10f451465bdd40 Mon Sep 17 00:00:00 2001 From: "Jonathan A. Sternberg" Date: Mon, 5 Nov 2018 16:55:28 -0600 Subject: [PATCH] fix(control): fix when a query is requeued multiple times When a query is requeued multiple times, it will return an error on the second attempt. This is because it tries to transition into the requeueing state, but it's already in that state so there is nowhere to go and it thinks a fatal error has happened. This fix patches things so if it is already in the requeueing state it does nothing. --- control/controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/control/controller.go b/control/controller.go index 68b74994a5..652ae1c3b1 100644 --- a/control/controller.go +++ b/control/controller.go @@ -615,6 +615,9 @@ func (q *Query) tryRequeue() bool { q.state = Requeueing return true + } else if q.state == Requeueing { + // Already in the correct state. + return true } return false }