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 2017/02/28 06:40:32 UTC

[1/4] kudu git commit: [linked list test] use timeout for WaitAndVerify in all modes

Repository: kudu
Updated Branches:
  refs/heads/master b2fc399f6 -> 50274c8f8


[linked list test] use timeout for WaitAndVerify in all modes

Constrain LinkedListTester::WaitAndVerify by the specified timeout
for FINISH_WITH_SNAPSHOT_SCAN mode as well.  Otherwise the
TestLoadAndVerify scenario of the LinkedListTest test can
run indefinitely under some conditions.  One of such conditions is
the expiration of the client authn token during the test: if that
happens, WaitAndVerify() call might end up doing indefinite retries.

The proper client behavior on the expiration of the authn token will be
addressed in a separate changelist.

Change-Id: If129738fbeef5394dfd1bcb160121e1d4131b3cc
Reviewed-on: http://gerrit.cloudera.org:8080/6155
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Mike Percy <mp...@apache.org>


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

Branch: refs/heads/master
Commit: b39bfcb4c919024abe2bd6e92ad7e4d9444c54f6
Parents: b2fc399
Author: Alexey Serbin <as...@cloudera.com>
Authored: Sat Feb 25 10:26:02 2017 -0800
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Tue Feb 28 01:57:23 2017 +0000

----------------------------------------------------------------------
 .../integration-tests/linked_list-test-util.h   | 29 ++++++++++----------
 1 file changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/b39bfcb4/src/kudu/integration-tests/linked_list-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/linked_list-test-util.h b/src/kudu/integration-tests/linked_list-test-util.h
index 876dc52..8d3d559 100644
--- a/src/kudu/integration-tests/linked_list-test-util.h
+++ b/src/kudu/integration-tests/linked_list-test-util.h
@@ -765,22 +765,23 @@ Status LinkedListTester::WaitAndVerify(int seconds_to_run,
           s = VerifyLinkedListAtLatestRemote(
               expected, last_attempt, boost::bind(&LinkedListTester::ReturnOk, this, _1), &seen);
         }
-
-        if (!s.ok()) {
-          LOG(INFO) << "Table not yet ready: " << seen << "/" << expected << " rows"
-                    << " (status: " << s.ToString() << ")";
-          if (last_attempt) {
-            // We'll give it an equal amount of time to re-load the data as it took
-            // to write it in. Typically it completes much faster than that.
-            return Status::TimedOut("Timed out waiting for table to be accessible again",
-                                    s.ToString());
-          }
-
-          // Sleep and retry until timeout.
-          SleepFor(MonoDelta::FromMilliseconds(20));
-        }
         break;
     }
+
+    if (!s.ok()) {
+      KLOG_EVERY_N(INFO, 10) << "Table not yet ready: " << seen << "/"
+                             << expected << " rows (status: "
+                             << s.ToString() << ")";
+      if (last_attempt) {
+        // We'll give it an equal amount of time to re-load the data as it took
+        // to write it in. Typically it completes much faster than that.
+        return Status::TimedOut("Timed out waiting for table to be accessible again",
+                                s.ToString());
+      }
+
+      // Sleep and retry until timeout.
+      SleepFor(MonoDelta::FromMilliseconds(20));
+    }
   } while (!s.ok());
 
   LOG(INFO) << "Successfully verified " << expected << " rows";


[4/4] kudu git commit: Fix TestKerberosRenewal/Reacquire flakiness

Posted by to...@apache.org.
Fix TestKerberosRenewal/Reacquire flakiness

It has been observed that an ExternalMiniCluster can take quite
long to start up (max observerd: 6s). TestKerberosRenewal/Reacquire ran
with the kerberos ticket lifetime as 5 seconds. If the ExternalMiniCluster
took longer than 5 seconds to start, the ticket of the test client would
expire, causing an unexpected test failure.

This patch increases the ticket lifetime to 15s. This will increase the
test time, but reduces the chance for flakiness.

Change-Id: If03a2b47e78a22736311e8dd160ddf63b86c4396
Reviewed-on: http://gerrit.cloudera.org:8080/6168
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/50274c8f
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/50274c8f
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/50274c8f

Branch: refs/heads/master
Commit: 50274c8f8bc4da19323694be8793612942002509
Parents: 2730f8b
Author: Sailesh Mukil <sa...@apache.org>
Authored: Mon Feb 27 13:13:57 2017 -0800
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Feb 28 06:19:46 2017 +0000

----------------------------------------------------------------------
 .../integration-tests/external_mini_cluster-test.cc  | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/50274c8f/src/kudu/integration-tests/external_mini_cluster-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster-test.cc b/src/kudu/integration-tests/external_mini_cluster-test.cc
index b73343f..5b3405c 100644
--- a/src/kudu/integration-tests/external_mini_cluster-test.cc
+++ b/src/kudu/integration-tests/external_mini_cluster-test.cc
@@ -59,9 +59,10 @@ void SmokeTestKerberizedCluster(const ExternalMiniClusterOptions& opts) {
 
   // Sleep long enough to ensure that the tserver's ticket would have expired
   // if not for the renewal thread doing its thing.
-  SleepFor(MonoDelta::FromSeconds(10));
+  SleepFor(MonoDelta::FromSeconds(16));
 
-  // Re-kinit for the client, since the client's ticket would have expired as well.
+  // Re-kinit for the client, since the client's ticket would have expired as well
+  // since the renewal thread doesn't run for the test client.
   ASSERT_OK(cluster.kdc()->Kinit("test-admin"));
 
   // Restart the master, and make sure the tserver is still able to reconnect and
@@ -74,22 +75,26 @@ void SmokeTestKerberizedCluster(const ExternalMiniClusterOptions& opts) {
 }
 
 TEST_F(ExternalMiniClusterTest, TestKerberosRenewal) {
+  if (!AllowSlowTests()) return;
+
   ExternalMiniClusterOptions opts;
   opts.enable_kerberos = true;
   // Set the kerberos ticket lifetime as 5 seconds to force ticket renewal every 5 seconds.
-  opts.mini_kdc_options.ticket_lifetime = "5s";
+  opts.mini_kdc_options.ticket_lifetime = "15s";
   opts.num_tablet_servers = 1;
 
   SmokeTestKerberizedCluster(opts);
 }
 
 TEST_F(ExternalMiniClusterTest, TestKerberosReacquire) {
+  if (!AllowSlowTests()) return;
+
   ExternalMiniClusterOptions opts;
   opts.enable_kerberos = true;
   // Set the kerberos ticket lifetime and the renew lifetime as 5 seconds each, to force the
   // processes to acquire a new ticket instead of being able to renew the existing one.
-  opts.mini_kdc_options.ticket_lifetime = "5s";
-  opts.mini_kdc_options.renew_lifetime = "5s";
+  opts.mini_kdc_options.ticket_lifetime = "15s";
+  opts.mini_kdc_options.renew_lifetime = "15s";
   opts.num_tablet_servers = 1;
 
   SmokeTestKerberizedCluster(opts);


[3/4] kudu git commit: Fix LTO support

Posted by to...@apache.org.
Fix LTO support

This fixes the CMake setup to be able to do LTO builds using lld and clang. I
was able to successfully enable LTO with this. However, the performance of
clang-3.9 + ThinLTO appeared to still be worse than devtoolset's gcc-4.9.2.

Nevertheless, it seemed like a good thing to commit to replace the currently
bogus flags.

Change-Id: I58a532dec43bd9ed5d7ea6419bc9dfc011f279b6
Reviewed-on: http://gerrit.cloudera.org:8080/6162
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/2730f8bd
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/2730f8bd
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/2730f8bd

Branch: refs/heads/master
Commit: 2730f8bd5a00de9e9f0efa6059607cfae434336a
Parents: 99ed629
Author: Todd Lipcon <to...@apache.org>
Authored: Sun Feb 26 18:03:40 2017 -0800
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Feb 28 05:49:13 2017 +0000

----------------------------------------------------------------------
 CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/2730f8bd/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72cf219..6ec3917 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,7 +183,9 @@ set(CXX_FLAGS_FASTDEBUG "-ggdb -O1 -fno-omit-frame-pointer")
 set(CXX_FLAGS_RELEASE "-O3 -g -DNDEBUG -fno-omit-frame-pointer")
 
 if (NOT "${KUDU_USE_LTO}" STREQUAL "")
-  set(CXX_FLAGS_RELEASE "${CXX_FLAGS_RELEASE} flto -fno-use-linker-plugin")
+  set(CXX_FLAGS_RELEASE "${CXX_FLAGS_RELEASE} -flto -fuse-ld=lld")
+  set(CMAKE_AR "llvm-ar")
+  set(CMAKE_RANLIB "llvm-ranlib")
 endif()
 
 set(CXX_FLAGS_PROFILE_GEN "${CXX_FLAGS_RELEASE} -fprofile-generate")


[2/4] kudu git commit: [doxygen] fixed recent doxygen warnings

Posted by to...@apache.org.
[doxygen] fixed recent doxygen warnings

Fixed a few doxygen warnings output by the 'make doxygen' target.
Also, fixed few typos in the comments.

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


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

Branch: refs/heads/master
Commit: 99ed6297244e009c9b7a371c1517ee7b733a30d1
Parents: b39bfcb
Author: Alexey Serbin <as...@cloudera.com>
Authored: Mon Feb 27 18:09:52 2017 -0800
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Tue Feb 28 02:42:48 2017 +0000

----------------------------------------------------------------------
 src/kudu/client/client.h | 12 +++++++-----
 src/kudu/util/status.h   |  8 +++++---
 2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/99ed6297/src/kudu/client/client.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/client.h b/src/kudu/client/client.h
index d8f2610..06eb895 100644
--- a/src/kudu/client/client.h
+++ b/src/kudu/client/client.h
@@ -230,6 +230,7 @@ class KUDU_EXPORT KuduClientBuilder {
   ///   The serialized authentication credentials, provided by a call to
   ///   @c KuduClient.ExportAuthenticationCredentials in the C++ client or
   ///   @c KuduClient#exportAuthenticationCredentials in the Java client.
+  /// @return Reference to the updated object.
   KuduClientBuilder& import_authentication_credentials(std::string authn_creds);
 
   /// Create a client object.
@@ -494,7 +495,8 @@ class KUDU_EXPORT KuduClient : public sp::enable_shared_from_this<KuduClient> {
   /// Java client via @c KuduClient#importAuthenticationCredentials.
   ///
   /// @param [out] authn_creds
-  ///   The resulting binary authentication credsentials.
+  ///   The resulting binary authentication credentials.
+  /// @return Status object for the operation.
   Status ExportAuthenticationCredentials(std::string* authn_creds) const;
 
  private:
@@ -1029,7 +1031,7 @@ class KUDU_EXPORT KuduTableAlterer {
   /// @param [in] name
   ///   Name of the column to alter.
   /// @return Pointer to the result ColumnSpec object. The alterer keeps
-  ///   owhership of the newly created object.
+  ///   ownership of the newly created object.
   KuduColumnSpec* AlterColumn(const std::string& name);
 
   /// Drops an existing column from the table.
@@ -1544,7 +1546,7 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
   /// @endcode
   /// ... @c callback_2 will be triggered once @c b has been inserted,
   /// regardless of whether @c a has completed or not. That means there might be
-  /// pending operations left in prior batches even after the the callback
+  /// pending operations left in prior batches even after the callback
   /// has been invoked to report on the flush status of the latest batch.
   ///
   /// @note This also means that, if FlushAsync is called twice in succession,
@@ -1565,7 +1567,7 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
   void FlushAsync(KuduStatusCallback* cb);
 
   /// @return Status of the session closure. In particular, an error is returned
-  ///   if there are unflushed or in-flight operations.
+  ///   if there are non-flushed or in-flight operations.
   Status Close() WARN_UNUSED_RESULT;
 
   /// Check if there are any pending operations in this session.
@@ -1863,7 +1865,7 @@ class KUDU_EXPORT KuduScanner {
   /// for an additional time-to-live (set by a configuration flag on
   /// the tablet server). This is useful if the interval in between
   /// NextBatch() calls is big enough that the remote scanner might be garbage
-  /// collected (default ttl is set to 60 secs.).
+  /// collected (default TTL is set to 60 secs.).
   /// This does not invalidate any previously fetched results.
   ///
   /// @return Operation result status. In particular, this method returns

http://git-wip-us.apache.org/repos/asf/kudu/blob/99ed6297/src/kudu/util/status.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/status.h b/src/kudu/util/status.h
index 75f0699..aaa5427 100644
--- a/src/kudu/util/status.h
+++ b/src/kudu/util/status.h
@@ -89,6 +89,8 @@
     KUDU_DCHECK(_s.ok()) << (msg) << ": " << _s.ToString();  \
   } while (0);
 
+/// @brief If the status is bad, DCHECK immediately, appending the status to the
+///   logged 'Bad status' message.
 #define KUDU_DCHECK_OK(s) KUDU_DCHECK_OK_PREPEND(s, "Bad status")
 
 /// @file status.h
@@ -309,11 +311,11 @@ class KUDU_EXPORT Status {
   std::string ToString() const;
 
   /// @return A string representation of the status code, without the message
-  ///   text or posix code information.
+  ///   text or POSIX code information.
   std::string CodeAsString() const;
 
   /// This is similar to ToString, except that it does not include
-  /// the stringified error code or posix code.
+  /// the stringified error code or POSIX code.
   ///
   /// @note The returned Slice is only valid as long as this Status object
   ///   remains live and unchanged.
@@ -400,7 +402,7 @@ inline Status::Status(const Status& s) {
 }
 inline void Status::operator=(const Status& s) {
   // The following condition catches both aliasing (when this == &s),
-  // and the common case where both s and *this are ok.
+  // and the common case where both s and *this are OK.
   if (state_ != s.state_) {
     delete[] state_;
     state_ = (s.state_ == NULL) ? NULL : CopyState(s.state_);