From 17a5be0b5238e4d30bf092d9e758c4893e930c08 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Wed, 25 Jul 2018 10:12:13 -0700 Subject: [PATCH] HBASE-20895 NPE in RpcServer#readAndProcess Synchronize readAndProcess() on the Connection to avoid MT issues with data buffer management --- .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e320e74aa8..57428517ac 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(); -- 2.18.0