From 399a5659b238ffd0660a98fb5ea7980ccc7b8ab2 Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Fri, 21 Sep 2018 17:40:14 -0700 Subject: [PATCH] fix incorrect precondition check in `SupervisorManager.suspendOrResumeSupervisor` (#6364) This check is reverse from the intention --- .../druid/indexing/overlord/supervisor/SupervisorManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java b/indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java index cca6fe51bd8..22fd82746a7 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java @@ -95,7 +95,7 @@ public class SupervisorManager { Preconditions.checkState(started, "SupervisorManager not started"); Pair pair = supervisors.get(id); - Preconditions.checkNotNull(pair.lhs, "spec"); + Preconditions.checkNotNull(pair.rhs, "spec"); synchronized (lock) { Preconditions.checkState(started, "SupervisorManager not started"); SupervisorSpec nextState = suspend ? pair.rhs.createSuspendedSpec() : pair.rhs.createRunningSpec();