From c612a2e3cc8118d60f4571a50ab4068bf1152478 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 4 Dec 2019 21:24:03 +0900 Subject: [PATCH] HBASE-23359 RS going down with NPE when splitting a region with compaction disabled in branch-1 (#899) Signed-off-by: Balazs Meszaros Signed-off-by Anoop Sam John --- .../apache/hadoop/hbase/regionserver/CompactSplitThread.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java index 09a3d06349da..2982e9358d41 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java @@ -608,7 +608,9 @@ public void rejectedExecution(Runnable runnable, ThreadPoolExecutor pool) { if (runnable instanceof CompactionRunner) { CompactionRunner runner = (CompactionRunner)runnable; LOG.debug("Compaction Rejected: " + runner); - runner.store.cancelRequestedCompaction(runner.compaction); + if (runner.compaction != null) { + runner.store.cancelRequestedCompaction(runner.compaction); + } } } }