You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2018/11/08 18:48:10 UTC
hbase git commit: HBASE-21357 RS should abort if OOM in Reader thread
Repository: hbase
Updated Branches:
refs/heads/branch-1.4 58dfaab4f -> 745cc7a03
HBASE-21357 RS should abort if OOM in Reader thread
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/745cc7a0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/745cc7a0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/745cc7a0
Branch: refs/heads/branch-1.4
Commit: 745cc7a0328ba7fe5bbf63de44af45825b036208
Parents: 58dfaab
Author: Allan Yang <al...@apache.org>
Authored: Wed Oct 24 11:10:20 2018 +0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Nov 8 10:48:01 2018 -0800
----------------------------------------------------------------------
.../main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/745cc7a0/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 3f11233..a32040c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -732,6 +732,17 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
LOG.error(getName() + ": CancelledKeyException in Reader", e);
} catch (IOException ex) {
LOG.info(getName() + ": IOException in Reader", ex);
+ } catch (OutOfMemoryError e) {
+ if (getErrorHandler() != null) {
+ if (getErrorHandler().checkOOME(e)) {
+ RpcServer.LOG.info(Thread.currentThread().getName()
+ + ": exiting on OutOfMemoryError");
+ return;
+ }
+ } else {
+ // rethrow if no handler
+ throw e;
+ }
}
}
}