[SCM] Apache ZooKeeper branch, master, updated. debian/3.4.5+dfsg-1_exp2-1-gc451bc9

James Page james.page at ubuntu.com
Sun Jun 9 20:55:42 UTC 2013


The following commit has been merged in the master branch:
commit c451bc993cd055b7480e8ca17b8384e33759a7d9
Author: James Page <james.page at ubuntu.com>
Date:   Sun Jun 9 21:35:40 2013 +0100

    Upload to unstable.
    
    * Upload to unstable.
    * d/p/fixes/ZOOKEEPER-740: Cherry picked fix from upstream bugtracker to
      resolve issue with slow running add_auth calls with multi-threaded
      client.
    * d/rules: Disable mt client tests due to test library incompatibility
      with libc 2.17.
    * d/rules: Drop override_dh_installdocs, no longer required.
    * d/control: Tweak depends for libzookeeper-java{-doc} to be Java policy
      compliant.

diff --git a/debian/changelog b/debian/changelog
index e2ed8c3..f23a3db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+zookeeper (3.4.5+dfsg-1) unstable; urgency=low
+
+  * Upload to unstable.
+  * d/p/fixes/ZOOKEEPER-740: Cherry picked fix from upstream bugtracker to
+    resolve issue with slow running add_auth calls with multi-threaded
+    client.
+  * d/rules: Disable mt client tests due to test library incompatibility
+    with libc 2.17.
+  * d/rules: Drop override_dh_installdocs, no longer required.
+  * d/control: Tweak depends for libzookeeper-java{-doc} to be Java policy
+    compliant.
+
+ -- James Page <james.page at ubuntu.com>  Mon, 06 May 2013 18:27:16 -0700
+
 zookeeper (3.4.5+dfsg-1~exp2) experimental; urgency=low
 
   * d/conf_example/environment: Add missing jars to zookeeper CLASSPATH
diff --git a/debian/control b/debian/control
index f7fe61b..56c9b24 100644
--- a/debian/control
+++ b/debian/control
@@ -43,6 +43,7 @@ Depends:
  libslf4j-java,
  libxerces2-java,
  ${misc:Depends}
+Recommends: libzookeeper-java-doc
 Description: Core Java libraries for zookeeper
  ZooKeeper is a centralized, reliable, service for maintaining configuration
  information, naming, providing distributed synchronization, and group
@@ -83,7 +84,7 @@ Description: Init control scripts for zookeeper
 Package: libzookeeper-java-doc
 Section: doc
 Architecture: all
-Depends: libzookeeper-java (= ${binary:Version}), ${misc:Depends}
+Depends: ${misc:Depends}
 Description: API Documentation for zookeeper
  ZooKeeper is a centralized, reliable, service for maintaining configuration
  information, naming, providing distributed synchronization, and group
diff --git a/debian/patches/fixes/ZOOKEEPER-770 b/debian/patches/fixes/ZOOKEEPER-770
new file mode 100644
index 0000000..00f21ce
--- /dev/null
+++ b/debian/patches/fixes/ZOOKEEPER-770
@@ -0,0 +1,76 @@
+Description: Slow add_auth calls with multi-threaded client
+Origin: https://issues.apache.org/jira/browse/ZOOKEEPER-770
+
+--- a/src/c/tests/TestClient.cc
++++ b/src/c/tests/TestClient.cc
+@@ -181,6 +181,20 @@ public:
+     }
+ } watchctx_t;
+ 
++static inline int calculate_interval(const struct timeval *start,
++         const struct timeval *end)
++{
++    int interval;
++    struct timeval i = *end;
++    i.tv_sec -= start->tv_sec;
++    i.tv_usec -= start->tv_usec;
++    interval = i.tv_sec * 1000 + (i.tv_usec/1000);
++    return interval;
++}
++
++static timeval completion_timestamp;
++
++
+ class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture
+ {
+     CPPUNIT_TEST_SUITE(Zookeeper_simpleSystem);
+@@ -420,6 +434,14 @@ public:
+         count++;
+     }
+ 
++
++    static void voidCompletionWithTimestamp(int rc, const void *data) {
++        int tmp = (int) (long) data;
++        CPPUNIT_ASSERT_EQUAL(tmp, rc);
++        gettimeofday(&completion_timestamp, 0);
++        count++;
++    }
++
+     static void verifyCreateFails(const char *path, zhandle_t *zk) {
+       CPPUNIT_ASSERT_EQUAL((int)ZBADARGUMENTS, zoo_create(zk,
+           path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0));
+@@ -507,6 +529,8 @@ public:
+         zhandle_t *zk = createClient(&ctx1);
+         struct ACL_vector nodeAcl;
+         struct ACL acl_val;
++        struct timeval started;
++
+         rc = zoo_add_auth(0, "", 0, 0, voidCompletion, (void*)-1);
+         CPPUNIT_ASSERT_EQUAL((int) ZBADARGUMENTS, rc);
+ 
+@@ -540,11 +564,13 @@ public:
+         //create a new client
+         zk = createClient(&ctx2);
+ 
+-        rc = zoo_add_auth(zk, "digest", "pat:passwd2", 11, voidCompletion,
++        gettimeofday(&started, 0);
++        rc = zoo_add_auth(zk, "digest", "pat:passwd2", 11, voidCompletionWithTimestamp,
+                           (void*)ZOK);
+         CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+         waitForVoidCompletion(3);
+         CPPUNIT_ASSERT(count == 0);
++        CPPUNIT_ASSERT(calculate_interval(&started, &completion_timestamp) < 2);
+ 
+         char buf[1024];
+         int blen = sizeof(buf);
+--- a/src/c/src/zookeeper.c
++++ b/src/c/src/zookeeper.c
+@@ -1314,7 +1314,7 @@ static int send_info_packet(zhandle_t *z
+     /* We queued the buffer, so don't free it */
+     close_buffer_oarchive(&oa, 0);
+ 
+-    return rc;
++    return rc<0 ? rc : adaptor_send_queue(zh, 0);
+ }
+ 
+ /** send all auths, not just the last one **/
diff --git a/debian/patches/series b/debian/patches/series
index d0b5792..9f3321f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ debian/patch-build-system
 debian/disable-cygwin-detection
 fixes/ZOOKEEPER-705
 ftbfs-gcc-4.7.diff
+fixes/ZOOKEEPER-770
diff --git a/debian/rules b/debian/rules
index 4ea23a5..702351e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -66,8 +66,9 @@ override_dh_auto_test-arch:
 		ln -sf /usr/share/java/$$jar.jar build/lib/$$jar.jar; \
 	done;
 	# Execute multi-threaded test suite
-	# Disable on Ubuntu due to glibc 2.17 incompatibility
-	if ! dpkg-vendor --derives-from ubuntu; then \
+	# Disable on Ubuntu and Debian due to glibc 2.17 incompatibility
+	# https://issues.apache.org/jira/browse/ZOOKEEPER-1646
+	if ! dpkg-vendor --derives-from debian; then \
 		$(MAKE) -C src/c zktest-mt; \
 		cd src/c && ./zktest-mt; \
 	fi;
@@ -126,16 +127,5 @@ override_dh_auto_clean:
 	rm -rf src/c/ltmain.sh
 	rm -rf src/c/TEST-*
 
-ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
-override_dh_installdocs:
-	dh_installdocs --link-doc=libzookeeper-java \
-	  -plibzookeeper-java -pzookeeper -pzookeeperd -plibzookeeper-java-doc
-	dh_installdocs --link-doc=libzookeeper-mt2 \
-	  -plibzookeeper-mt2 -plibzookeeper-mt-dev -pzookeeper-bin \
-      -ppython-zookeeper -plibzookeeper2
-	dh_installdocs --link-doc=libzookeeper-st2 \
-	  -plibzookeeper-st2 -plibzookeeper-st-dev
-endif
-
 override_dh_installinit:
 	dh_installinit -d

-- 
Apache ZooKeeper



More information about the pkg-java-commits mailing list