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/02 22:20:26 UTC

[kudu] branch master updated: [clock] remove 'experimental' tag from some clock-related flags

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 708f250  [clock] remove 'experimental' tag from some clock-related flags
708f250 is described below

commit 708f2501aa36acfdbdd7951c455d96397ccda523
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Wed Oct 2 13:09:11 2019 -0700

    [clock] remove 'experimental' tag from some clock-related flags
    
    This patch removes 'experimental' tag from few flags to enable using
    the built-in NTP client in masters and tablet servers without adding
    the --unlock_experimental_flags extra.  These flags are now tagged
    as 'evolving' (explicitly) to signal that they are available to use,
    but might change in future releases.
    
    Change-Id: Ic987b13b6c1eb2c886eeebaaddfc0f376e3d3954
    Reviewed-on: http://gerrit.cloudera.org:8080/14351
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Reviewed-by: Grant Henke <gr...@apache.org>
    Tested-by: Kudu Jenkins
---
 src/kudu/clock/builtin_ntp.cc  | 22 +++++++++++++---------
 src/kudu/clock/hybrid_clock.cc |  5 +++--
 src/kudu/clock/hybrid_clock.h  |  1 -
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/kudu/clock/builtin_ntp.cc b/src/kudu/clock/builtin_ntp.cc
index f6d19bd..af1e93d 100644
--- a/src/kudu/clock/builtin_ntp.cc
+++ b/src/kudu/clock/builtin_ntp.cc
@@ -67,7 +67,7 @@ DEFINE_string(builtin_ntp_servers,
               "The NTP servers used by the built-in NTP client, in format "
               "<FQDN|IP>[:PORT]. These will only be used if the built-in NTP "
               "client is enabled.");
-TAG_FLAG(builtin_ntp_servers, experimental);
+TAG_FLAG(builtin_ntp_servers, evolving);
 
 // In the 'Best practices' section, RFC 4330 states that 15 seconds is the
 // minimum allowed polling interval.
@@ -81,9 +81,20 @@ TAG_FLAG(builtin_ntp_servers, experimental);
 DEFINE_uint32(builtin_ntp_poll_interval_ms, 16000,
               "The time between successive polls of a single NTP server "
               "(in milliseconds)");
-TAG_FLAG(builtin_ntp_poll_interval_ms, experimental);
+TAG_FLAG(builtin_ntp_poll_interval_ms, advanced);
+TAG_FLAG(builtin_ntp_poll_interval_ms, evolving);
 TAG_FLAG(builtin_ntp_poll_interval_ms, runtime);
 
+DEFINE_string(builtin_ntp_client_bind_address, "0.0.0.0",
+              "Local address to bind client UDP socket used to send and "
+              "receive NTP packets. The default value '0.0.0.0' is equivalent "
+              "to '0.0.0.0:0' meaning 'bind to all available IPv4 interfaces "
+              "using ephemeral ports (i.e. port 0)'. It might be useful "
+              "to customize this flag if getting through a firewall to "
+              "reach public NTP servers specified by --builtin_ntp_servers.");
+TAG_FLAG(builtin_ntp_client_bind_address, advanced);
+TAG_FLAG(builtin_ntp_client_bind_address, evolving);
+
 DEFINE_uint32(builtin_ntp_request_timeout_ms, 3000,
               "Timeout for requests sent to NTP servers (in milliseconds)");
 TAG_FLAG(builtin_ntp_request_timeout_ms, experimental);
@@ -95,13 +106,6 @@ DEFINE_uint32(builtin_ntp_true_time_refresh_max_interval_s, 3600,
 TAG_FLAG(builtin_ntp_true_time_refresh_max_interval_s, experimental);
 TAG_FLAG(builtin_ntp_true_time_refresh_max_interval_s, runtime);
 
-DEFINE_string(builtin_ntp_client_bind_address, "0.0.0.0",
-              "Local address to bind client UDP socket used to send and "
-              "receive NTP packets. The default value '0.0.0.0' is equivalent "
-              "to '0.0.0.0:0' meaning 'bind to all available IPv4 interfaces "
-              "using ephemeral ports (i.e. port 0)'.");
-TAG_FLAG(builtin_ntp_client_bind_address, experimental);
-
 using kudu::clock::internal::Interval;
 using kudu::clock::internal::kIntervalNone;
 using kudu::clock::internal::RecordedResponse;
diff --git a/src/kudu/clock/hybrid_clock.cc b/src/kudu/clock/hybrid_clock.cc
index 67e81ae..39b1e59 100644
--- a/src/kudu/clock/hybrid_clock.cc
+++ b/src/kudu/clock/hybrid_clock.cc
@@ -32,6 +32,7 @@
 #include "kudu/gutil/bind.h"
 #include "kudu/gutil/bind_helpers.h"
 #include "kudu/gutil/macros.h"
+#include "kudu/gutil/port.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/debug/trace_event.h"
 #include "kudu/util/flag_tags.h"
@@ -62,7 +63,7 @@ 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)");
-TAG_FLAG(time_source, experimental);
+TAG_FLAG(time_source, evolving);
 DEFINE_validator(time_source, [](const char* /* flag_name */, const string& value) {
   if (boost::iequals(value, "system") ||
       boost::iequals(value, "builtin") ||
@@ -79,8 +80,8 @@ DEFINE_int32(ntp_initial_sync_wait_secs, 60,
              "startup. A value of zero means Kudu will fail to start "
              "if the clock is unsynchronized. This flag can prevent Kudu from "
              "crashing if it starts before NTP can synchronize the clock.");
-TAG_FLAG(ntp_initial_sync_wait_secs, evolving);
 TAG_FLAG(ntp_initial_sync_wait_secs, advanced);
+TAG_FLAG(ntp_initial_sync_wait_secs, evolving);
 
 METRIC_DEFINE_gauge_uint64(server, hybrid_clock_timestamp,
                            "Hybrid Clock Timestamp",
diff --git a/src/kudu/clock/hybrid_clock.h b/src/kudu/clock/hybrid_clock.h
index 22c17ed..dbfa201 100644
--- a/src/kudu/clock/hybrid_clock.h
+++ b/src/kudu/clock/hybrid_clock.h
@@ -24,7 +24,6 @@
 #include "kudu/clock/time_service.h"
 #include "kudu/common/common.pb.h"
 #include "kudu/common/timestamp.h"
-#include "kudu/gutil/port.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/util/locks.h"
 #include "kudu/util/metrics.h"