You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/08/16 07:53:24 UTC

kudu git commit: Enable replay cache by default

Repository: kudu
Updated Branches:
  refs/heads/branch-0.10.x 4bc68d2a9 -> 2b6712003


Enable replay cache by default

We've done looping of the stress tests, as well as some significant
cluster testing (YCSB on 72 node cluster for several days). In the
cluster, we didn't see any significant increased memory usage due to
this feature, nor any stability issues.

Additionally, the risk of the feature is relatively low: the worst
it could cause is memory leaks or crashes, but no chance for permanent
data corruption or loss. For the time being, I am leaving the ability
to disable the feature via a gflag, in case we do see any instability.
We can remove the flag entirely in the 1.0 timeframe.

Change-Id: I35b5e74ac30aa3309a0a7e035c8dff7f61c3f275
Reviewed-on: http://gerrit.cloudera.org:8080/4003
Reviewed-by: Todd Lipcon <to...@apache.org>
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/2b671200
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/2b671200
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/2b671200

Branch: refs/heads/branch-0.10.x
Commit: 2b671200388ec15e91df1123740f38b884df7abe
Parents: 4bc68d2
Author: Todd Lipcon <to...@apache.org>
Authored: Tue Aug 16 00:17:14 2016 -0700
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Aug 16 07:53:05 2016 +0000

----------------------------------------------------------------------
 .../src/test/java/org/apache/kudu/client/MiniKuduCluster.java | 1 -
 src/kudu/integration-tests/external_mini_cluster-itest-base.h | 2 --
 src/kudu/integration-tests/tablet_copy-itest.cc               | 3 ---
 src/kudu/integration-tests/ts_itest-base.h                    | 2 --
 src/kudu/rpc/rpc-test-base.h                                  | 3 ---
 src/kudu/rpc/service_if.cc                                    | 7 ++++---
 src/kudu/tserver/tablet_server-test-base.h                    | 5 -----
 7 files changed, 4 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/2b671200/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKuduCluster.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKuduCluster.java b/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKuduCluster.java
index 3cfff34..34e44bf 100644
--- a/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKuduCluster.java
+++ b/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKuduCluster.java
@@ -128,7 +128,6 @@ public class MiniKuduCluster implements AutoCloseable {
           "--fs_wal_dir=" + dataDirPath,
           "--fs_data_dirs=" + dataDirPath,
           "--flush_threshold_mb=1",
-          "--enable_exactly_once",
           "--tserver_master_addrs=" + masterAddresses,
           "--webserver_interface=" + localhost,
           "--local_ip_for_outbound_sockets=" + localhost,

http://git-wip-us.apache.org/repos/asf/kudu/blob/2b671200/src/kudu/integration-tests/external_mini_cluster-itest-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster-itest-base.h b/src/kudu/integration-tests/external_mini_cluster-itest-base.h
index 0fde8d4..e2a9cf5 100644
--- a/src/kudu/integration-tests/external_mini_cluster-itest-base.h
+++ b/src/kudu/integration-tests/external_mini_cluster-itest-base.h
@@ -77,8 +77,6 @@ void ExternalMiniClusterITestBase::StartCluster(const std::vector<std::string>&
   opts.num_tablet_servers = num_tablet_servers;
   opts.extra_master_flags = extra_master_flags;
   opts.extra_tserver_flags = extra_ts_flags;
-  // TODO remove when this is enabled by default.
-  opts.extra_tserver_flags.push_back("--enable_exactly_once");
   opts.extra_tserver_flags.push_back("--never_fsync"); // fsync causes flakiness on EC2.
   cluster_.reset(new ExternalMiniCluster(opts));
   ASSERT_OK(cluster_->Start());

http://git-wip-us.apache.org/repos/asf/kudu/blob/2b671200/src/kudu/integration-tests/tablet_copy-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/tablet_copy-itest.cc b/src/kudu/integration-tests/tablet_copy-itest.cc
index 9938a3e..fba0520 100644
--- a/src/kudu/integration-tests/tablet_copy-itest.cc
+++ b/src/kudu/integration-tests/tablet_copy-itest.cc
@@ -112,9 +112,6 @@ void TabletCopyITest::StartCluster(const vector<string>& extra_tserver_flags,
   ExternalMiniClusterOptions opts;
   opts.num_tablet_servers = num_tablet_servers;
   opts.extra_tserver_flags = extra_tserver_flags;
-  // Enable EO semantics for tests.
-  // TODO remove this once EO is the default.
-  opts.extra_tserver_flags.push_back("--enable_exactly_once");
   opts.extra_tserver_flags.push_back("--never_fsync"); // fsync causes flakiness on EC2.
   opts.extra_master_flags = extra_master_flags;
   cluster_.reset(new ExternalMiniCluster(opts));

http://git-wip-us.apache.org/repos/asf/kudu/blob/2b671200/src/kudu/integration-tests/ts_itest-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/ts_itest-base.h b/src/kudu/integration-tests/ts_itest-base.h
index 2810930..15e232c 100644
--- a/src/kudu/integration-tests/ts_itest-base.h
+++ b/src/kudu/integration-tests/ts_itest-base.h
@@ -98,8 +98,6 @@ class TabletServerIntegrationTestBase : public TabletServerTestBase {
     opts.data_root = GetTestPath(data_root_path);
 
     // Enable exactly once semantics for tests.
-    // TODO remove this once we have ResultTracker GC
-    opts.extra_tserver_flags.push_back("--enable_exactly_once");
 
     // If the caller passed no flags use the default ones, where we stress consensus by setting
     // low timeouts and frequent cache misses.

http://git-wip-us.apache.org/repos/asf/kudu/blob/2b671200/src/kudu/rpc/rpc-test-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc-test-base.h b/src/kudu/rpc/rpc-test-base.h
index 9e4f00f..cb0a068 100644
--- a/src/kudu/rpc/rpc-test-base.h
+++ b/src/kudu/rpc/rpc-test-base.h
@@ -46,8 +46,6 @@
 #include "kudu/util/test_util.h"
 #include "kudu/util/trace.h"
 
-DECLARE_bool(enable_exactly_once);
-
 namespace kudu { namespace rpc {
 
 using kudu::rpc_test::AddRequestPB;
@@ -321,7 +319,6 @@ class RpcTestBase : public KuduTest {
       n_server_reactor_threads_(3),
       keepalive_time_ms_(1000),
       metric_entity_(METRIC_ENTITY_server.Instantiate(&metric_registry_, "test.rpc_test")) {
-    FLAGS_enable_exactly_once = true;
   }
 
   void SetUp() override {

http://git-wip-us.apache.org/repos/asf/kudu/blob/2b671200/src/kudu/rpc/service_if.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/service_if.cc b/src/kudu/rpc/service_if.cc
index d64647b..aee9a7e 100644
--- a/src/kudu/rpc/service_if.cc
+++ b/src/kudu/rpc/service_if.cc
@@ -30,9 +30,10 @@
 #include "kudu/util/flag_tags.h"
 
 // TODO remove this once we have fully cluster-tested this.
-DEFINE_bool(enable_exactly_once, false, "Whether to enable exactly once semantics on the client "
-    "(experimental).");
-TAG_FLAG(enable_exactly_once, experimental);
+// Despite being on by default, this is left in in case we discover
+// any issues in 0.10.0, we'll have an easy workaround to disable the feature.
+DEFINE_bool(enable_exactly_once, true, "Whether to enable exactly once semantics.");
+TAG_FLAG(enable_exactly_once, hidden);
 
 using google::protobuf::Message;
 using std::string;

http://git-wip-us.apache.org/repos/asf/kudu/blob/2b671200/src/kudu/tserver/tablet_server-test-base.h
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_server-test-base.h b/src/kudu/tserver/tablet_server-test-base.h
index 736c5ca..e245c3f 100644
--- a/src/kudu/tserver/tablet_server-test-base.h
+++ b/src/kudu/tserver/tablet_server-test-base.h
@@ -58,7 +58,6 @@
 DEFINE_int32(rpc_timeout, 1000, "Timeout for RPC calls, in seconds");
 DEFINE_int32(num_updater_threads, 1, "Number of updating threads to launch");
 DECLARE_bool(log_force_fsync_all);
-DECLARE_bool(enable_exactly_once);
 DECLARE_bool(enable_maintenance_manager);
 DECLARE_bool(enable_data_block_fsync);
 DECLARE_int32(heartbeat_rpc_timeout_ms);
@@ -81,10 +80,6 @@ class TabletServerTestBase : public KuduTest {
     // maintenance operations at predetermined times.
     FLAGS_enable_maintenance_manager = false;
 
-    // Enable exactly once semantics, for tests.
-    // TODO remove this once we have ResultTracker GC
-    FLAGS_enable_exactly_once = true;
-
     // Decrease heartbeat timeout: we keep re-trying heartbeats when a
     // single master server fails due to a network error. Decreasing
     // the hearbeat timeout to 1 second speeds up unit tests which