You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/09/13 07:14:23 UTC

[1/4] kudu git commit: debug-util-test: address flakiness

Repository: kudu
Updated Branches:
  refs/heads/master e4213d590 -> 1a062253e


debug-util-test: address flakiness

In TSAN builds, this test seems to fail sometimes due to not starting
the 'SleeperThread' fast enough. It used to wait only 1 second for the
thread to start. This now uses 'AssertEventually' which has a much
longer (30-second) timeout.

Change-Id: I02b1273352ac8521dee01b7e0b4d4df21e90e517
Reviewed-on: http://gerrit.cloudera.org:8080/4346
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/048e3967
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/048e3967
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/048e3967

Branch: refs/heads/master
Commit: 048e396705c3c53379ac8a3993109142ca7baf14
Parents: e4213d5
Author: Todd Lipcon <to...@apache.org>
Authored: Fri Sep 9 10:23:53 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Tue Sep 13 03:33:43 2016 +0000

----------------------------------------------------------------------
 src/kudu/util/debug-util-test.cc | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/048e3967/src/kudu/util/debug-util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/debug-util-test.cc b/src/kudu/util/debug-util-test.cc
index a4563da..407bd76 100644
--- a/src/kudu/util/debug-util-test.cc
+++ b/src/kudu/util/debug-util-test.cc
@@ -86,13 +86,9 @@ TEST_F(DebugUtilTest, TestSignalStackTrace) {
 
   // We have to loop a little bit because it takes a little while for the thread
   // to start up and actually call our function.
-  string stack;
-  for (int i = 0; i < 10000; i++) {
-    stack = DumpThreadStack(t->tid());
-    if (stack.find("SleeperThread") != string::npos) break;
-    SleepFor(MonoDelta::FromMicroseconds(100));
-  }
-  ASSERT_STR_CONTAINS(stack, "SleeperThread");
+  AssertEventually([&]() {
+      ASSERT_STR_CONTAINS(DumpThreadStack(t->tid()), "SleeperThread")
+    });
 
   // Test that we can change the signal and that the stack traces still work,
   // on the new signal.


[4/4] kudu git commit: [client] avoid circular deps in time-based flusher

Posted by to...@apache.org.
[client] avoid circular deps in time-based flusher

The boost::bind() makes cast of parameters during the call,
not during creation of the functor object:
  http://stackoverflow.com/questions/11255144/why-does-boostbind-store-arguments-of-the-type-passed-in-rather-than-of-the-ty

So, it's necessary to pass weak pointers to the background auto-flush
task to avoid circular dependencies between client::KuduSession::Data
and rpc::Messenger.  Besides, it does not make much sense to store
shared reference to messenger in KuduSession::Data since it's always
passed as a weak reference and then promoting to a shared one during
the call in all usage scenarios.

Thanks to Adar and Todd spotting the usual suspect there.

This is a follow-up for 93be1310d227cf05025864654ca3f6713c2ddc2c.

Change-Id: I59825981a600f5882ee476479c2ddf16b495c1f9
Reviewed-on: http://gerrit.cloudera.org:8080/4395
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
Tested-by: Todd Lipcon <to...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/1a062253
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/1a062253
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/1a062253

Branch: refs/heads/master
Commit: 1a062253e3fdc900a4b0b418520d2870b6de8846
Parents: ac02b20
Author: Alexey Serbin <as...@cloudera.com>
Authored: Mon Sep 12 18:03:27 2016 -0700
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Sep 13 06:52:14 2016 +0000

----------------------------------------------------------------------
 src/kudu/client/session-internal.cc | 20 ++++++++++----------
 src/kudu/client/session-internal.h  | 10 +++++-----
 2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/1a062253/src/kudu/client/session-internal.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/session-internal.cc b/src/kudu/client/session-internal.cc
index 8da7679..661288d 100644
--- a/src/kudu/client/session-internal.cc
+++ b/src/kudu/client/session-internal.cc
@@ -40,7 +40,7 @@ using sp::weak_ptr;
 
 
 KuduSession::Data::Data(shared_ptr<KuduClient> client,
-                        std::shared_ptr<rpc::Messenger> messenger)
+                        std::weak_ptr<rpc::Messenger> messenger)
     : client_(std::move(client)),
       messenger_(std::move(messenger)),
       error_collector_(new ErrorCollector()),
@@ -58,8 +58,8 @@ KuduSession::Data::Data(shared_ptr<KuduClient> client,
       buffer_pre_flush_enabled_(true) {
 }
 
-void KuduSession::Data::Init(const weak_ptr<KuduSession>& session) {
-  TimeBasedFlushInit(session);
+void KuduSession::Data::Init(weak_ptr<KuduSession> session) {
+  TimeBasedFlushInit(std::move(session));
 }
 
 void KuduSession::Data::FlushFinished(Batcher* batcher) {
@@ -109,7 +109,7 @@ Status KuduSession::Data::SetExternalConsistencyMode(
 }
 
 Status KuduSession::Data::SetFlushMode(FlushMode mode,
-                                       const sp::weak_ptr<KuduSession>& session) {
+                                       sp::weak_ptr<KuduSession> session) {
   {
     std::lock_guard<Mutex> l(mutex_);
     if (HasPendingOperationsUnlocked()) {
@@ -129,7 +129,7 @@ Status KuduSession::Data::SetFlushMode(FlushMode mode,
     flush_mode_ = mode;
   }
 
-  TimeBasedFlushInit(session);
+  TimeBasedFlushInit(std::move(session));
 
   return Status::OK();
 }
@@ -320,7 +320,7 @@ MonoDelta KuduSession::Data::FlushCurrentBatcher(const MonoDelta& max_age) {
 // batcher (success path) or in the error collector (failure path). Otherwise
 // it would be a memory leak.
 Status KuduSession::Data::ApplyWriteOp(
-    const sp::weak_ptr<KuduSession>& weak_session,
+    sp::weak_ptr<KuduSession> weak_session,
     KuduWriteOperation* write_op) {
 
   if (!write_op) {
@@ -429,7 +429,7 @@ Status KuduSession::Data::ApplyWriteOp(
       // of control since no thread-safety is advertised
       // for the kudu::KuduSession interface.
       scoped_refptr<Batcher> batcher(
-          new Batcher(client_.get(), error_collector_, weak_session,
+          new Batcher(client_.get(), error_collector_, std::move(weak_session),
                       external_consistency_mode_));
       if (timeout_ms_ != -1) {
         batcher->SetTimeoutMillis(timeout_ms_);
@@ -462,7 +462,7 @@ Status KuduSession::Data::ApplyWriteOp(
 void KuduSession::Data::TimeBasedFlushInit(
     sp::weak_ptr<KuduSession> weak_session) {
   KuduSession::Data::TimeBasedFlushTask(
-      Status::OK(), messenger_, weak_session, true);
+      Status::OK(), messenger_, std::move(weak_session), true);
 }
 
 void KuduSession::Data::TimeBasedFlushTask(
@@ -513,8 +513,8 @@ void KuduSession::Data::TimeBasedFlushTask(
   std::shared_ptr<rpc::Messenger> messenger(weak_messenger.lock());
   if (PREDICT_TRUE(messenger)) {
     messenger->ScheduleOnReactor(
-        boost::bind(&KuduSession::Data::TimeBasedFlushTask,
-                    _1, messenger, session, false),
+        boost::bind(&KuduSession::Data::TimeBasedFlushTask, _1,
+                    std::move(weak_messenger), std::move(weak_session), false),
         next_run);
   }
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/1a062253/src/kudu/client/session-internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/session-internal.h b/src/kudu/client/session-internal.h
index e050301..fe2225c 100644
--- a/src/kudu/client/session-internal.h
+++ b/src/kudu/client/session-internal.h
@@ -55,9 +55,9 @@ class ErrorCollector;
 class KuduSession::Data {
  public:
   explicit Data(sp::shared_ptr<KuduClient> client,
-                std::shared_ptr<rpc::Messenger> messenger);
+                std::weak_ptr<rpc::Messenger> messenger);
 
-  void Init(const sp::weak_ptr<KuduSession>& session);
+  void Init(sp::weak_ptr<KuduSession> session);
 
   // Called by Batcher when a flush has finished.
   void FlushFinished(internal::Batcher* b);
@@ -68,7 +68,7 @@ class KuduSession::Data {
   Status Close(bool force);
 
   // Set flush mode for the session.
-  Status SetFlushMode(FlushMode mode, const sp::weak_ptr<KuduSession>& session);
+  Status SetFlushMode(FlushMode mode, sp::weak_ptr<KuduSession> session);
 
   // Set external consistency mode for the session.
   Status SetExternalConsistencyMode(KuduSession::ExternalConsistencyMode m);
@@ -123,7 +123,7 @@ class KuduSession::Data {
   MonoDelta FlushCurrentBatcher(const MonoDelta& max_age);
 
   // Apply a write operation, i.e. push it through the batcher chain.
-  Status ApplyWriteOp(const sp::weak_ptr<KuduSession>& session,
+  Status ApplyWriteOp(sp::weak_ptr<KuduSession> session,
                       KuduWriteOperation* write_op);
 
   // Check and start the time-based flush task in background, if necessary.
@@ -160,7 +160,7 @@ class KuduSession::Data {
 
   // The reference to the client's messenger (keeping the reference instead of
   // declaring friendship to KuduClient and accessing it via the client_).
-  std::shared_ptr<rpc::Messenger> messenger_;
+  std::weak_ptr<rpc::Messenger> messenger_;
 
   // Buffer for errors.
   scoped_refptr<internal::ErrorCollector> error_collector_;


[3/4] kudu git commit: KUDU-1301 - [python] Tests leak tmp directory

Posted by to...@apache.org.
KUDU-1301 - [python] Tests leak tmp directory

In the past the python tests have been leaking tmp directories and
processes for the master and tablet servers.  Previously, with
commit 89380b53d48b085dfe394b9966360d1ef1a4b038, the check for
temp leak was disabled for python tests to avoid errors. This patch
fixes both the temp directory and the process leak and re-enables
the leak check for python.

Change-Id: I95d03ab1c23c7712ab647e37a646d5e22a758a9b
Reviewed-on: http://gerrit.cloudera.org:8080/4372
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/ac02b204
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/ac02b204
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/ac02b204

Branch: refs/heads/master
Commit: ac02b204584725f50b00797748e5d94f327f70bf
Parents: e1108ba
Author: Jordan Birdsell <jo...@gmail.com>
Authored: Sun Sep 11 17:15:54 2016 -0400
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Sep 13 04:20:10 2016 +0000

----------------------------------------------------------------------
 build-support/jenkins/build-and-test.sh | 24 ++++++++++--------------
 python/kudu/tests/test_scanner.py       |  4 ----
 2 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/ac02b204/build-support/jenkins/build-and-test.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index 8d90b99..7b9e552 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -419,20 +419,16 @@ if [ $EXIT_STATUS != 0 ]; then
 fi
 
 # If all tests passed, ensure that they cleaned up their test output.
-#
-# TODO: Python is currently leaking a tmp directory sometimes (KUDU-1301).
-# Temporarily disabled until that's fixed.
-#
-# if [ $EXIT_STATUS == 0 ]; then
-#   TEST_TMPDIR_CONTENTS=$(ls $TEST_TMPDIR)
-#   if [ -n "$TEST_TMPDIR_CONTENTS" ]; then
-#     echo "All tests passed, yet some left behind their test output:"
-#     for SUBDIR in $TEST_TMPDIR_CONTENTS; do
-#       echo $SUBDIR
-#     done
-#     EXIT_STATUS=1
-#   fi
-# fi
+if [ $EXIT_STATUS == 0 ]; then
+  TEST_TMPDIR_CONTENTS=$(ls $TEST_TMPDIR)
+  if [ -n "$TEST_TMPDIR_CONTENTS" ]; then
+    echo "All tests passed, yet some left behind their test output:"
+    for SUBDIR in $TEST_TMPDIR_CONTENTS; do
+      echo $SUBDIR
+    done
+    EXIT_STATUS=1
+  fi
+fi
 
 set -e
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/ac02b204/python/kudu/tests/test_scanner.py
----------------------------------------------------------------------
diff --git a/python/kudu/tests/test_scanner.py b/python/kudu/tests/test_scanner.py
index 1a6f11c..3938d3c 100644
--- a/python/kudu/tests/test_scanner.py
+++ b/python/kudu/tests/test_scanner.py
@@ -50,10 +50,6 @@ class TestScanner(KuduTestBase, unittest.TestCase):
         cls.table = table
         cls.tuples = tuples
 
-    @classmethod
-    def tearDownClass(cls):
-        pass
-
     def setUp(self):
         pass
 


[2/4] kudu git commit: Bump version to 1.1.0-SNAPSHOT

Posted by to...@apache.org.
Bump version to 1.1.0-SNAPSHOT

Change-Id: Ifd9db10a73fecbb73cebe66c16d16e9d11a98750
Reviewed-on: http://gerrit.cloudera.org:8080/4400
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Todd Lipcon <to...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/e1108ba0
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/e1108ba0
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/e1108ba0

Branch: refs/heads/master
Commit: e1108ba01682af90b16bec6c8400b4b102df8815
Parents: 048e396
Author: Todd Lipcon <to...@apache.org>
Authored: Mon Sep 12 20:26:33 2016 -0700
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Sep 13 04:19:27 2016 +0000

----------------------------------------------------------------------
 java/interface-annotations/pom.xml       | 2 +-
 java/kudu-client-tools/pom.xml           | 2 +-
 java/kudu-client/pom.xml                 | 2 +-
 java/kudu-csd/pom.xml                    | 4 ++--
 java/kudu-csd/src/descriptor/service.sdl | 2 +-
 java/kudu-flume-sink/pom.xml             | 2 +-
 java/kudu-mapreduce/pom.xml              | 2 +-
 java/kudu-spark/pom.xml                  | 2 +-
 java/pom.xml                             | 2 +-
 version.txt                              | 2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/interface-annotations/pom.xml
----------------------------------------------------------------------
diff --git a/java/interface-annotations/pom.xml b/java/interface-annotations/pom.xml
index f1455fd..62e3a26 100644
--- a/java/interface-annotations/pom.xml
+++ b/java/interface-annotations/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.kudu</groupId>
     <artifactId>kudu-parent</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>interface-annotations</artifactId>

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/kudu-client-tools/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-client-tools/pom.xml b/java/kudu-client-tools/pom.xml
index 775787b..7913b4b 100644
--- a/java/kudu-client-tools/pom.xml
+++ b/java/kudu-client-tools/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.kudu</groupId>
         <artifactId>kudu-parent</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>kudu-client-tools</artifactId>

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/kudu-client/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-client/pom.xml b/java/kudu-client/pom.xml
index 6f2f03e..45a2813 100644
--- a/java/kudu-client/pom.xml
+++ b/java/kudu-client/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.kudu</groupId>
         <artifactId>kudu-parent</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>kudu-client</artifactId>

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/kudu-csd/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-csd/pom.xml b/java/kudu-csd/pom.xml
index e846655..8ee5fd2 100644
--- a/java/kudu-csd/pom.xml
+++ b/java/kudu-csd/pom.xml
@@ -19,12 +19,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.kudu</groupId>
     <artifactId>kudu-parent</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
 
   <groupId>com.cloudera.csd</groupId>
   <artifactId>KUDU</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
+  <version>1.1.0-SNAPSHOT</version>
   <name>The Kudu CSD</name>
   <packaging>pom</packaging>
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/kudu-csd/src/descriptor/service.sdl
----------------------------------------------------------------------
diff --git a/java/kudu-csd/src/descriptor/service.sdl b/java/kudu-csd/src/descriptor/service.sdl
index d07e572..c2cd823 100644
--- a/java/kudu-csd/src/descriptor/service.sdl
+++ b/java/kudu-csd/src/descriptor/service.sdl
@@ -18,7 +18,7 @@
   "name" : "KUDU",
   "label" : "Kudu (Beta)",
   "description" : "Kudu is a true column store for the Hadoop ecosystem. <span class=\"error\">Kudu is currently in Beta and is not supported. Before adding this service, ensure that you have installed the Kudu binaries, which are not included in CDH.</span>",
-  "version" : "0.6.0",
+  "version" : "1.1.0",
   "compatibility" : {
     "generation" : 1
   },

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/kudu-flume-sink/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-flume-sink/pom.xml b/java/kudu-flume-sink/pom.xml
index 7bb193c..0afa9f5 100644
--- a/java/kudu-flume-sink/pom.xml
+++ b/java/kudu-flume-sink/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <artifactId>kudu-parent</artifactId>
     <groupId>org.apache.kudu</groupId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <artifactId>kudu-flume-sink</artifactId>
   <name>Kudu Flume NG Sink</name>

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/kudu-mapreduce/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-mapreduce/pom.xml b/java/kudu-mapreduce/pom.xml
index b03f6da..e0c1132 100644
--- a/java/kudu-mapreduce/pom.xml
+++ b/java/kudu-mapreduce/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.kudu</groupId>
         <artifactId>kudu-parent</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>kudu-mapreduce</artifactId>

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/kudu-spark/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-spark/pom.xml b/java/kudu-spark/pom.xml
index 00635a3..4c4cda9 100644
--- a/java/kudu-spark/pom.xml
+++ b/java/kudu-spark/pom.xml
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.apache.kudu</groupId>
         <artifactId>kudu-parent</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>kudu-spark_${scala.binary.version}</artifactId>

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/java/pom.xml
----------------------------------------------------------------------
diff --git a/java/pom.xml b/java/pom.xml
index 9dc59a9..451545d 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -24,7 +24,7 @@
 
     <groupId>org.apache.kudu</groupId>
     <artifactId>kudu-parent</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.1.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <!-- inherit from the ASF POM for distribution management -->

http://git-wip-us.apache.org/repos/asf/kudu/blob/e1108ba0/version.txt
----------------------------------------------------------------------
diff --git a/version.txt b/version.txt
index f755149..5902d52 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-1.0.0-SNAPSHOT
+1.1.0-SNAPSHOT