You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/07/31 20:36:26 UTC

[GitHub] [zookeeper] anmolnar commented on a change in pull request #1030: ZOOKEEPER-1636: cleanup completion list of a failed multi request

anmolnar commented on a change in pull request #1030: ZOOKEEPER-1636: cleanup completion list of a failed multi request
URL: https://github.com/apache/zookeeper/pull/1030#discussion_r309419317
 
 

 ##########
 File path: zookeeper-client/zookeeper-client-c/tests/TestMulti.cc
 ##########
 @@ -656,6 +667,63 @@ class Zookeeper_multi : public CPPUNIT_NS::TestFixture
         waitForMultiCompletion(5);
      }
 
+     /**
+     * ZOOKEEPER-1636: If request is too large, the server will cut the
+     * connection without sending response packet. The client will try to
+     * process completion on multi request and eventually cause SIGSEGV
+     */
+    void testBigAsyncMulti() {
+        int rc;
+        int callback_rc = (int) ZOK;
+        watchctx_t ctx;
+        zhandle_t *zk = createClient(&ctx);
+
+         // The request should be more than 1MB which exceeds the default
+        // jute.maxbuffer and causes the server to drop client connection
+        const int iteration = 500;
+        const int type_count = 3;
+        const int nops = iteration * type_count;
+        char buff[1024];
+
+         zoo_op_result_t results[nops];
 
 Review comment:
   There're some indentation mistakes in this test. Please fix them.

----------------------------------------------------------------
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