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/07/28 02:19:19 UTC

[4/4] hbase git commit: HBASE-20895 NPE in RpcServer#readAndProcess

HBASE-20895 NPE in RpcServer#readAndProcess

Synchronize readAndProcess() on the Connection to avoid MT issues with
data buffer management


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

Branch: refs/heads/branch-1.4
Commit: 3d4c7710ac21f3e0c3205417764f127fcc16b284
Parents: a55bcbd
Author: Andrew Purtell <ap...@apache.org>
Authored: Fri Jul 27 18:07:58 2018 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Jul 27 18:08:13 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/3d4c7710/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 c4c7360..3950939 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
@@ -1635,7 +1635,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
      * @throws IOException
      * @throws InterruptedException
      */
-    public int readAndProcess() throws IOException, InterruptedException {
+    public synchronized int readAndProcess() throws IOException, InterruptedException {
       // If we have not read the connection setup preamble, look to see if that is on the wire.
       if (!connectionPreambleRead) {
         int count = readPreamble();