Repository: hbase
Updated Branches:
  refs/heads/branch-1 ecc1c294f -> 76da21fc5


HBASE-16670 Make RpcServer#processRequest logic more robust


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/76da21fc
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/76da21fc
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/76da21fc

Branch: refs/heads/branch-1
Commit: 76da21fc59ec5bda75cdb35a8747505a621677de
Parents: ecc1c29
Author: Yu Li <l...@apache.org>
Authored: Thu Sep 22 15:43:53 2016 +0800
Committer: Yu Li <l...@apache.org>
Committed: Thu Sep 22 15:44:45 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/76da21fc/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 db615a8..f7cc85f 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
@@ -1904,6 +1904,12 @@ public class RpcServer implements RpcServerInterface, 
ConfigurationObserver {
             param = builder.build();
           }
           offset += paramSize;
+        } else {
+          // currently header must have request param, so we directly throw 
exception here
+          String msg = "Invalid request header: " + 
TextFormat.shortDebugString(header)
+              + ", should have param set in it";
+          LOG.warn(msg);
+          throw new DoNotRetryIOException(msg);
         }
         if (header.hasCellBlockMeta()) {
           buf.position(offset);

Reply via email to