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:18 UTC

[3/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/16138513
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/16138513
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/16138513

Branch: refs/heads/branch-1.3
Commit: 16138513cc1bb62f0019613f17e0141582f25fff
Parents: fb6b922
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:10 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/16138513/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 e320e74..5742851 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
@@ -1637,7 +1637,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();