You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2021/03/25 17:17:32 UTC

[kudu] branch master updated: [client] add logging on slow tablet opening

This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new 1eb2a2f  [client] add logging on slow tablet opening
1eb2a2f is described below

commit 1eb2a2fbca329721ec7152714b7c95374754044b
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Wed Mar 24 21:40:45 2021 -0700

    [client] add logging on slow tablet opening
    
    This patch adds logging on slow tablet opening with 500ms threshold.
    
    This is a follow-up to 44d687caf3633d75b0cc64f1a25f444484ce43ad.
    
    Change-Id: I8d52a7adbef0b21372c5c301b1c0f79cc7ffc481
    Reviewed-on: http://gerrit.cloudera.org:8080/17232
    Tested-by: Alexey Serbin <as...@cloudera.com>
    Reviewed-by: Bankim Bhavsar <ba...@cloudera.com>
    Reviewed-by: Grant Henke <gr...@apache.org>
---
 src/kudu/client/scanner-internal.cc | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/kudu/client/scanner-internal.cc b/src/kudu/client/scanner-internal.cc
index 75bcbd3..a56a8f3 100644
--- a/src/kudu/client/scanner-internal.cc
+++ b/src/kudu/client/scanner-internal.cc
@@ -55,26 +55,26 @@
 #include "kudu/util/hexdump.h"
 #include "kudu/util/logging.h"
 #include "kudu/util/monotime.h"
+#include "kudu/util/stopwatch.h"
 
 using google::protobuf::FieldDescriptor;
 using google::protobuf::Reflection;
+using kudu::rpc::ComputeExponentialBackoff;
+using kudu::rpc::CredentialsPolicy;
+using kudu::rpc::RpcController;
+using kudu::security::SignedTokenPB;
+using kudu::tserver::NewScanRequestPB;
+using kudu::tserver::RowFormatFlags;
+using kudu::tserver::ScanResponsePB;
+using kudu::tserver::TabletServerFeatures;
 using std::set;
 using std::string;
 using std::unique_ptr;
 using std::vector;
+using strings::Substitute;
 
 namespace kudu {
 
-using rpc::ComputeExponentialBackoff;
-using rpc::CredentialsPolicy;
-using rpc::RpcController;
-using security::SignedTokenPB;
-using strings::Substitute;
-using tserver::NewScanRequestPB;
-using tserver::RowFormatFlags;
-using tserver::ScanResponsePB;
-using tserver::TabletServerFeatures;
-
 namespace client {
 
 using internal::RemoteTabletServer;
@@ -403,6 +403,7 @@ ScanRpcStatus KuduScanner::Data::SendScanRpc(const MonoTime& overall_deadline,
 Status KuduScanner::Data::OpenTablet(const string& partition_key,
                                      const MonoTime& deadline,
                                      set<string>* blacklist) {
+  SCOPED_LOG_SLOW_EXECUTION(WARNING, 500, "opening tablet");
 
   PrepareRequest(KuduScanner::Data::NEW);
   next_req_.clear_scanner_id();