From b03ed8bae0a13577fc762f8ab0a14d9c8db33deb 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 d0a28ed771ce..9a6a81c1669c 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 @@ -673,9 +673,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);