You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/03/01 20:00:03 UTC

[GitHub] [hbase] chenxu14 opened a new pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up

chenxu14 opened a new pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
URL: https://github.com/apache/hbase/pull/1231
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [hbase] wchevreuil commented on a change in pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up

Posted by GitBox <gi...@apache.org>.
wchevreuil commented on a change in pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
URL: https://github.com/apache/hbase/pull/1231#discussion_r386144505
 
 

 ##########
 File path: hbase-client/src/main/java/org/apache/hadoop/hbase/RequestIOMessUpException.java
 ##########
 @@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase;
+
+import java.io.IOException;
+import org.apache.yetus.audience.InterfaceAudience;
+
+/**
+ * Thrown by a region server if the request IO mess up.
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+public class RequestIOMessUpException extends IOException {
 
 Review comment:
   What is a request IO mess up? Some sort of corruption in the stream? A socket time out? It would be nice to provide more details in the comments and maybe rename it to something more intuitive, such as "RequestIOCorruptionException" or "RpcCorruptionException"? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [hbase] chenxu14 commented on issue #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up

Posted by GitBox <gi...@apache.org>.
chenxu14 commented on issue #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
URL: https://github.com/apache/hbase/pull/1231#issuecomment-593191060
 
 
   For example, client side sent a message like 4|ABCD, but server side decoding it to 4|ABC,
   the exact reason is not clear yet, suspected that there are some bugs with the KeyValueCodec

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [hbase] wchevreuil commented on a change in pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up

Posted by GitBox <gi...@apache.org>.
wchevreuil commented on a change in pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
URL: https://github.com/apache/hbase/pull/1231#discussion_r386308348
 
 

 ##########
 File path: hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestBlockingIPC.java
 ##########
 @@ -106,4 +121,62 @@ protected RpcServer createTestFailingRpcServer(Server server, String name,
       Configuration conf, RpcScheduler scheduler) throws IOException {
     return new TestFailingRpcServer(server, name, services, bindAddress, conf, scheduler);
   }
+
+  private static class TestIOMessUpRpcServer extends SimpleRpcServer {
+    TestIOMessUpRpcServer(Server server, String name,
+        List<RpcServer.BlockingServiceAndInterface> services, InetSocketAddress bindAddress,
+        Configuration conf, RpcScheduler scheduler) throws IOException {
+      super(server, name, services, bindAddress, conf, scheduler, true);
+    }
+
+    @Override
+    protected SimpleServerRpcConnection getConnection(SocketChannel channel, long time) {
+      return new SimpleServerRpcConnection(this, channel, time) {
+        private boolean ioMessUp = true;
+        @Override
+        void initByteBuffToReadInto(int length) {
+          if (connectionHeaderRead && connectionPreambleRead && ioMessUp) {
+            // mock that the request has mess up
+            ioMessUp = false;
+            super.initByteBuffToReadInto(length + 100);
+          } else {
+            super.initByteBuffToReadInto(length);
+          }
+        }
+      };
+    }
+  }
+
+  private RpcServer createIOMessUpRpcServer(Server server, String name,
+      List<RpcServer.BlockingServiceAndInterface> services, InetSocketAddress bindAddress,
+      Configuration conf, RpcScheduler scheduler) throws IOException {
+    return new TestIOMessUpRpcServer(server, name, services, bindAddress, conf, scheduler);
+  }
+
+  @Test
+  public void testRequestIOMessUp() throws IOException, ServiceException {
+    String msg = "hello";
+    Configuration conf = new Configuration(CONF);
+    RpcServer rpcServer = createIOMessUpRpcServer(null, "testRpcServer",
+        Lists.newArrayList(new RpcServer.BlockingServiceAndInterface(
+            SERVICE, null)), new InetSocketAddress("localhost", 0), conf,
+        new FifoRpcScheduler(conf, 1));
+
+    try (AbstractRpcClient<?> client = createRpcClient(conf)) {
+      rpcServer.start();
+      BlockingInterface stub = newBlockingStub(client, rpcServer.getListenerAddress());
+      EchoRequestProto param = EchoRequestProto.newBuilder().setMessage(msg).build();
+      try {
+        stub.echo(null, param);
+        fail("RPC should have failed because request IO mess up.");
+      } catch (ServiceException e) {
+        assertTrue(e.toString(),
+            StringUtils.stringifyException(e).contains("RequestIOMessUpException"));
+        // mess up IO don't blocking subsequent requests
+        assertEquals(msg, stub.echo(null, param).getMessage());
 
 Review comment:
   nit: use _expected_ flag in _@Test_ annotation?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [hbase] Apache9 commented on issue #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up

Posted by GitBox <gi...@apache.org>.
Apache9 commented on issue #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
URL: https://github.com/apache/hbase/pull/1231#issuecomment-593165851
 
 
   Pardon me, I do not fully follow what is going on here. What do you mean by request IO mess up? Could you please explain more? How would it happen?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [hbase] chenxu14 commented on a change in pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up

Posted by GitBox <gi...@apache.org>.
chenxu14 commented on a change in pull request #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
URL: https://github.com/apache/hbase/pull/1231#discussion_r386774260
 
 

 ##########
 File path: hbase-client/src/main/java/org/apache/hadoop/hbase/RequestIOMessUpException.java
 ##########
 @@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hbase;
+
+import java.io.IOException;
+import org.apache.yetus.audience.InterfaceAudience;
+
+/**
+ * Thrown by a region server if the request IO mess up.
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+public class RequestIOMessUpException extends IOException {
 
 Review comment:
   rename it to RequestIOCorruptionException

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [hbase] Apache-HBase commented on issue #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on issue #1231: HBASE-23917 [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
URL: https://github.com/apache/hbase/pull/1231#issuecomment-593153591
 
 
   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 31s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  The patch appears to include 1 new or modified test files.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 38s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 16s |  master passed  |
   | +1 :green_heart: |  compile  |   1m 25s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 40s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   4m 40s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m  3s |  master passed  |
   | +0 :ok: |  spotbugs  |   4m 31s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   5m 36s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 15s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   5m 13s |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 23s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m 23s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   1m 36s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  shadedjars  |   5m 23s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  hadoopcheck  |  15m 58s |  Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.  |
   | +1 :green_heart: |  javadoc  |   0m 57s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   5m 54s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 56s |  hbase-client in the patch passed.  |
   | -1 :x: |  unit  |  72m  9s |  hbase-server in the patch failed.  |
   | +1 :green_heart: |  asflicense  |   1m  5s |  The patch does not generate ASF License warnings.  |
   |  |   | 138m 26s |   |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | hadoop.hbase.security.TestSecureIPC |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.6 Server=19.03.6 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1231/1/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1231 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile |
   | uname | Linux 82afb8159fea 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1231/out/precommit/personality/provided.sh |
   | git revision | master / 48a3ccf523 |
   | Default Java | 1.8.0_181 |
   | unit | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1231/1/artifact/out/patch-unit-hbase-server.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1231/1/testReport/ |
   | Max. process+thread count | 8874 (vs. ulimit of 10000) |
   | modules | C: hbase-client hbase-server U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1231/1/console |
   | versions | git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services