diff --git a/CHANGES.txt b/CHANGES.txt index 70da40e7dad..145f762ba70 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -426,6 +426,7 @@ Release 0.92.0 - Unreleased storefileUncompressedSizeMB (gaojinchao) HBASE-4478 Improve AssignmentManager.handleRegion so that it can process certain ZK state in the case of RS offline + HBASE-4777 Write back to client 'incompatible' if we show up with wrong version TESTS HBASE-4450 test for number of blocks read: to serve as baseline for expected diff --git a/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java b/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java index 9117f12a074..d9ba0ea3955 100644 --- a/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java +++ b/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java @@ -90,7 +90,7 @@ public abstract class HBaseServer implements RpcServer { * The first four bytes of Hadoop RPC connections */ public static final ByteBuffer HEADER = ByteBuffer.wrap("hrpc".getBytes()); - public static final byte CURRENT_VERSION = 4; + public static final byte CURRENT_VERSION = 3; /** * How many calls/handler are allowed in the queue. @@ -1185,7 +1185,12 @@ public abstract class HBaseServer implements RpcServer { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); if (clientVersion >= 3) { - Call fakeCall = new Call(-1, null, this, responder); + // We used to return an id of -1 which caused server to close the + // connection without telling the client what the problem was. Now + // we return 0 which will keep the socket up -- bad clients, unless + // they switch to suit the running server -- will fail later doing + // getProtocolVersion. + Call fakeCall = new Call(0, null, this, responder); // Versions 3 and greater can interpret this exception // response in the same manner setupResponse(buffer, fakeCall, Status.FATAL,