From 7a8483bee4ec01babc46bd7a181f6c2216a29dc3 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Mon, 8 Nov 2021 18:31:21 -0800 Subject: [PATCH] HBASE-26429 HeapMemoryManager fails memstore flushes with NPE if enabled (#3819) Signed-off-by: Duo Zhang Signed-off-by: Viraj Jasani --- .../apache/hadoop/hbase/regionserver/MemStoreFlusher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java index f168c2c997ec..a5f91b42047a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java @@ -646,9 +646,9 @@ private void notifyFlushRequest(Region region, boolean emergencyFlush) { FlushType type = null; if (emergencyFlush) { type = isAboveHighWaterMark(); - if (type == null) { - type = isAboveLowWaterMark(); - } + } + if (type == null) { + type = isAboveLowWaterMark(); } for (FlushRequestListener listener : flushRequestListeners) { listener.flushRequested(type, region);