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 6bdcc4e  [mini_cluster] fix adding NTP flags for tservers
6bdcc4e is described below

commit 6bdcc4ef536c413615030b37520f6f1dfec65970
Author: Alexey Serbin <[email protected]>
AuthorDate: Wed Oct 2 12:28:51 2019 -0700

    [mini_cluster] fix adding NTP flags for tservers
    
    This patch fixes adding NTP-related flags for tablet servers.  Prior
    to this change, the NTP-related flags were added _after_ custom flags
    specified by ExternalMiniClusterOptions::extra_tserver_flags, but it's
    expected the latter are the last ones.  A few tests manipulate the flags
    after first start of a tablet server, expecting some particular order:
    those would fail if not keeping the expected flags order.
    
    Change-Id: Ia6c45f4a50c3850a2bdeae88720f78737dc1b270
    Reviewed-on: http://gerrit.cloudera.org:8080/14350
    Reviewed-by: Adar Dembo <[email protected]>
    Tested-by: Kudu Jenkins
---
 src/kudu/mini-cluster/external_mini_cluster.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/kudu/mini-cluster/external_mini_cluster.cc 
b/src/kudu/mini-cluster/external_mini_cluster.cc
index 058721e..cd33faf 100644
--- a/src/kudu/mini-cluster/external_mini_cluster.cc
+++ b/src/kudu/mini-cluster/external_mini_cluster.cc
@@ -22,6 +22,7 @@
 #include <cstdint>
 #include <cstdlib>
 #include <functional>
+#include <iterator>
 #include <memory>
 #include <string>
 #include <unordered_set>
@@ -615,8 +616,10 @@ Status ExternalMiniCluster::AddTabletServer() {
     opts.perf_record_filename =
         Substitute("$0/perf-$1.data", opts.log_dir, daemon_id);
   }
-  auto extra_flags = SubstituteInFlags(opts_.extra_tserver_flags, idx);
+  vector<string> extra_flags;
   RETURN_NOT_OK(AddNtpFlags(&extra_flags));
+  auto flags = SubstituteInFlags(opts_.extra_tserver_flags, idx);
+  std::copy(flags.begin(), flags.end(), std::back_inserter(extra_flags));
   opts.extra_flags = extra_flags;
   opts.start_process_timeout = opts_.start_process_timeout;
   opts.rpc_bind_address = HostPort(bind_host, 0);

Reply via email to