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 2019/10/05 07:12:45 UTC

[kudu] branch master updated (03e2ada -> 68302a6)

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

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


    from 03e2ada  [test] use built-in NTP by default for ExternalMiniCluster
     new 8c43941  [clock] update description of --time_source flag
     new 68302a6  KUDU-2069 p6: allow setting tserver states

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/kudu/clock/hybrid_clock.cc                       | 15 ++++++++-------
 src/kudu/integration-tests/maintenance_mode-itest.cc |  1 -
 src/kudu/master/master_service.cc                    | 10 ----------
 src/kudu/master/ts_state-test.cc                     |  4 ----
 4 files changed, 8 insertions(+), 22 deletions(-)


[kudu] 01/02: [clock] update description of --time_source flag

Posted by al...@apache.org.
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 8c439410df562979bb88f937771a144c4a6537f2
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Fri Oct 4 10:59:12 2019 -0700

    [clock] update description of --time_source flag
    
    Update the description of the --time_source flag.  In prior version it
    might read as to be a test-only flag.  Other minor modifications.
    
    This patch does not contain any functional modifications.
    
    Change-Id: I5a684fd3373724e09247106d35a23c225d16f366
    Reviewed-on: http://gerrit.cloudera.org:8080/14374
    Reviewed-by: Grant Henke <gr...@apache.org>
    Tested-by: Kudu Jenkins
---
 src/kudu/clock/hybrid_clock.cc | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/kudu/clock/hybrid_clock.cc b/src/kudu/clock/hybrid_clock.cc
index 39b1e59..9a8579a 100644
--- a/src/kudu/clock/hybrid_clock.cc
+++ b/src/kudu/clock/hybrid_clock.cc
@@ -56,22 +56,23 @@ TAG_FLAG(max_clock_sync_error_usec, advanced);
 TAG_FLAG(max_clock_sync_error_usec, runtime);
 
 DEFINE_bool(use_hybrid_clock, true,
-            "Whether HybridClock should be used as the default clock"
-            " implementation. This should be disabled for testing purposes only.");
+            "Whether HybridClock should be used as the default clock "
+            "implementation. This should be disabled for testing purposes only.");
 TAG_FLAG(use_hybrid_clock, hidden);
 
 DEFINE_string(time_source, "system",
-              "The clock source that HybridClock should use. Must be one of "
-              "'system', 'builtin', or 'mock' (for tests only)");
+              "The time source that HybridClock should use. Must be one of "
+              "'system', 'builtin', or 'mock' ('mock' is for tests only)");
 TAG_FLAG(time_source, evolving);
-DEFINE_validator(time_source, [](const char* /* flag_name */, const string& value) {
+DEFINE_validator(time_source, [](const char* flag_name, const string& value) {
   if (boost::iequals(value, "system") ||
       boost::iequals(value, "builtin") ||
       boost::iequals(value, "mock")) {
     return true;
   }
-  LOG(ERROR) << "unknown value for 'time_source': '" << value << "'"
-             << " (expected one of 'system', 'builtin', or 'mock')";
+  LOG(ERROR) << Substitute("unknown value for --$0 flag: '$1' "
+                           "(expected one of 'system', 'builtin', or 'mock')",
+                           flag_name, value);
   return false;
 });
 


[kudu] 02/02: KUDU-2069 p6: allow setting tserver states

Posted by al...@apache.org.
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 <aw...@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 <as...@cloudera.com>
    Reviewed-by: Grant Henke <gr...@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