diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java index d5cde9b4343..bc55af1fe2a 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java @@ -679,6 +679,7 @@ public synchronized void shutdown() throws InterruptedException { if (!this.running) { return; } + this.running = false; LOG.info("Shutting down GarbageCollectorThread"); throttler.cancelledAcquire(); @@ -688,7 +689,6 @@ public synchronized void shutdown() throws InterruptedException { Thread.sleep(100); } - this.running = false; // Interrupt GC executor thread gcExecutor.shutdownNow(); try {