kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpe...@apache.org
Subject [2/2] kudu git commit: Increase --tablet_copy_begin_session_timeout_ms to 30 sec
Date Sat, 09 Jun 2018 01:04:12 GMT
Increase --tablet_copy_begin_session_timeout_ms to 30 sec

This patch bumps the tablet copy begin session timeout from 3 seconds to
30 seconds. 3 seconds is too low of a value in cases where there is a
lot of disk activity on the remote server.

This patch also tweaks a couple of other minor things, like explicitly
setting the controller timeout in the case of a StartTabletCopy() RPC,
however there is no functionality change there because the same
RpcController is shared between UpdateConsensus() and StartTabletCopy()
calls, and the same timeout value is used for both. I just found it
confusing that the timeout was explicitly set for one but not the other.

Change-Id: I9e364d60351ad925583f8d7ef9dea55e0dac2507
Reviewed-on: http://gerrit.cloudera.org:8080/10651
Reviewed-by: Will Berkeley <wdberkeley@gmail.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/a9a54ec9
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/a9a54ec9
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/a9a54ec9

Branch: refs/heads/master
Commit: a9a54ec94be852c6733dc533c517ce931458949d
Parents: dd71ddc
Author: Mike Percy <mpercy@apache.org>
Authored: Thu Jun 7 11:41:51 2018 -0700
Committer: Mike Percy <mpercy@apache.org>
Committed: Sat Jun 9 01:01:56 2018 +0000

----------------------------------------------------------------------
 src/kudu/consensus/consensus_peers.cc  | 3 ++-
 src/kudu/tserver/tablet_copy_client.cc | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/a9a54ec9/src/kudu/consensus/consensus_peers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/consensus_peers.cc b/src/kudu/consensus/consensus_peers.cc
index 5a0c965..b4df599 100644
--- a/src/kudu/consensus/consensus_peers.cc
+++ b/src/kudu/consensus/consensus_peers.cc
@@ -416,7 +416,7 @@ void Peer::ProcessTabletCopyResponse() {
               tc_response_.error().code() != TabletServerErrorPB::TabletServerErrorPB::THROTTLED)
{
     // THROTTLED is a common response after a tserver with many replicas fails;
     // logging it would generate a great deal of log spam.
-    LOG_WITH_PREFIX_UNLOCKED(WARNING) << "Unable to begin Tablet Copy on peer: "
+    LOG_WITH_PREFIX_UNLOCKED(WARNING) << "Unable to start Tablet Copy on peer: "
                                       << (controller_status.ok() ?
                                           SecureShortDebugString(tc_response_) :
                                           controller_status.ToString());
@@ -493,6 +493,7 @@ void RpcPeerProxy::StartTabletCopy(const StartTabletCopyRequestPB* request,
                                    StartTabletCopyResponsePB* response,
                                    rpc::RpcController* controller,
                                    const rpc::ResponseCallback& callback) {
+  controller->set_timeout(MonoDelta::FromMilliseconds(FLAGS_consensus_rpc_timeout_ms));
   consensus_proxy_->StartTabletCopyAsync(*request, response, controller, callback);
 }
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/a9a54ec9/src/kudu/tserver/tablet_copy_client.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_copy_client.cc b/src/kudu/tserver/tablet_copy_client.cc
index cb4ca7f..d8bbc55 100644
--- a/src/kudu/tserver/tablet_copy_client.cc
+++ b/src/kudu/tserver/tablet_copy_client.cc
@@ -67,10 +67,10 @@
 #include "kudu/util/scoped_cleanup.h"
 #include "kudu/util/status.h"
 
-DEFINE_int32(tablet_copy_begin_session_timeout_ms, 3000,
+DEFINE_int32(tablet_copy_begin_session_timeout_ms, 30000,
              "Tablet server RPC client timeout for BeginTabletCopySession calls. "
              "Also used for EndTabletCopySession calls.");
-TAG_FLAG(tablet_copy_begin_session_timeout_ms, hidden);
+TAG_FLAG(tablet_copy_begin_session_timeout_ms, advanced);
 
 DEFINE_bool(tablet_copy_save_downloaded_metadata, false,
             "Save copies of the downloaded tablet copy files for debugging purposes. "
@@ -265,6 +265,7 @@ Status TabletCopyClient::Start(const HostPort& copy_source_addr,
   }
 
   session_id_ = resp.session_id();
+  // Update our default RPC timeout to reflect the server's session timeout.
   session_idle_timeout_millis_ = resp.session_idle_timeout_millis();
 
   // Store a copy of the remote (old) superblock.


Mime
View raw message