kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [kudu] 02/02: KUDU-2069 p6: allow setting tserver states
Date Sat, 05 Oct 2019 07:12:47 GMT
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

commit 68302a6cb40f1b325c891194eef6cc148310bf82
Author: Andrew Wong <awong@apache.org>
AuthorDate: Thu Oct 3 18:33:56 2019 -0700

    KUDU-2069 p6: allow setting tserver states
    
    Now that the behavior exists and works as we want it to, this patch
    removes the gates that prevented setting tserver states.
    
    Change-Id: If56b3f8b95a497c0b72789e80a86877efa33fc2f
    Reviewed-on: http://gerrit.cloudera.org:8080/14367
    Tested-by: Kudu Jenkins
    Reviewed-by: Alexey Serbin <aserbin@cloudera.com>
    Reviewed-by: Grant Henke <granthenke@apache.org>
---
 src/kudu/integration-tests/maintenance_mode-itest.cc |  1 -
 src/kudu/master/master_service.cc                    | 10 ----------
 src/kudu/master/ts_state-test.cc                     |  4 ----
 3 files changed, 15 deletions(-)

diff --git a/src/kudu/integration-tests/maintenance_mode-itest.cc b/src/kudu/integration-tests/maintenance_mode-itest.cc
index 43f73a2..958c177 100644
--- a/src/kudu/integration-tests/maintenance_mode-itest.cc
+++ b/src/kudu/integration-tests/maintenance_mode-itest.cc
@@ -93,7 +93,6 @@ class MaintenanceModeITest : public ExternalMiniClusterITestBase {
   void SetUpCluster(int num_tservers) {
     ExternalMiniClusterOptions opts;
     opts.num_tablet_servers = num_tservers;
-    opts.extra_master_flags = { "--master_support_maintenance_mode=true" };
     opts.extra_tserver_flags = kTServerFlags;
     NO_FATALS(StartClusterWithOpts(std::move(opts)));
     const auto& addr = cluster_->master(0)->bound_rpc_addr();
diff --git a/src/kudu/master/master_service.cc b/src/kudu/master/master_service.cc
index f9e74e1..c206697 100644
--- a/src/kudu/master/master_service.cc
+++ b/src/kudu/master/master_service.cc
@@ -94,12 +94,6 @@ DEFINE_bool(master_support_authz_tokens, true,
             "testing version compatibility in the client.");
 TAG_FLAG(master_support_authz_tokens, hidden);
 
-// TODO(awong): once maintenance mode is done, remove this.
-DEFINE_bool(master_support_maintenance_mode, false,
-            "Whether the master supports maintenance mode. Used for "
-            "testing while maintenance mode in progress.");
-TAG_FLAG(master_support_maintenance_mode, hidden);
-
 using boost::make_optional;
 using google::protobuf::Message;
 using kudu::consensus::ReplicaManagementInfoPB;
@@ -196,10 +190,6 @@ void MasterServiceImpl::ChangeTServerState(const ChangeTServerStateRequestPB*
re
       rpc->RespondFailure(s);
     }
   });
-  if (PREDICT_FALSE(!FLAGS_master_support_maintenance_mode)) {
-    s = Status::NotSupported("maintenance mode is not supported");
-    return;
-  }
   if (!req->has_change()) {
     s = Status::InvalidArgument("request must contain tserver state change");
     return;
diff --git a/src/kudu/master/ts_state-test.cc b/src/kudu/master/ts_state-test.cc
index 9ba575b..bb48871 100644
--- a/src/kudu/master/ts_state-test.cc
+++ b/src/kudu/master/ts_state-test.cc
@@ -22,7 +22,6 @@
 #include <utility>
 #include <vector>
 
-#include <gflags/gflags_declare.h>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
@@ -49,8 +48,6 @@
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
-DECLARE_bool(master_support_maintenance_mode);
-
 using kudu::consensus::ReplicaManagementInfoPB;
 using kudu::rpc::Messenger;
 using kudu::rpc::MessengerBuilder;
@@ -319,7 +316,6 @@ TEST_F(TServerStateTest, MaintenanceModeTServerDoesntGetNewReplicas) {
 
 // Test to exercise the RPC endpoint to change the tserver state.
 TEST_F(TServerStateTest, TestRPCs) {
-  FLAGS_master_support_maintenance_mode = true;
   ChangeTServerStateRequestPB req;
   Status s;
   // Sends a state change RPC and ensures there's an error, matching the


Mime
View raw message