From 7269aa3743cefe0485060d0c8e600e3b2527efd8 Mon Sep 17 00:00:00 2001 From: Sergey Shelukhin Date: Thu, 2 May 2019 18:08:02 -0700 Subject: [PATCH] HBASE-22354 master never sets abortRequested, and thus abort timeout doesn't work for it Signed-off-by: Peter Somogyi --- .../main/java/org/apache/hadoop/hbase/master/HMaster.java | 1 + .../org/apache/hadoop/hbase/regionserver/HRegionServer.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 41d25b92e7e..99e677b2c4c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -2850,6 +2850,7 @@ public class HMaster extends HRegionServer implements MasterServices { if (isAborted() || isStopped()) { return; } + setAbortRequested(); if (cpHost != null) { // HBASE-4014: dump a list of loaded coprocessors. LOG.error(HBaseMarkers.FATAL, "Master server abort: loaded coprocessors are: " + diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 7fb2c89bf45..36e09775df0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2377,7 +2377,7 @@ public class HRegionServer extends HasThread implements } else { LOG.error(HBaseMarkers.FATAL, msg); } - this.abortRequested = true; + setAbortRequested(); // HBASE-4014: show list of coprocessors that were loaded to help debug // regionserver crashes.Note that we're implicitly using // java.util.HashSet's toString() method to print the coprocessor names. @@ -2410,6 +2410,10 @@ public class HRegionServer extends HasThread implements stop(reason, true, null); } + protected final void setAbortRequested() { + this.abortRequested = true; + } + /** * @see HRegionServer#abort(String, Throwable) */