You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2016/09/26 19:25:02 UTC

[1/6] kudu git commit: tsan-suppressions: suppress various glog/gflags data races

Repository: kudu
Updated Branches:
  refs/heads/master e14bb60cc -> dba7cddf7


tsan-suppressions: suppress various glog/gflags data races

In an upcoming patch we'll begin building more of our thirdparty
dependencies with -fsanitize=thread. Having tested that, I saw that TSAN now
flags some new data races. All of them are "benign" in that they should be
safe on x86. Nonetheless, we either need to patch glog/gflags to fix them,
or suppress them. I chose the latter for expediency.

Change-Id: I3906070cb0e202e5b841f5b163e4adc023fe3882
Reviewed-on: http://gerrit.cloudera.org:8080/4509
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <da...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/bafbc4a2
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/bafbc4a2
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/bafbc4a2

Branch: refs/heads/master
Commit: bafbc4a2ca56080c8426e5ca7bcde87feb516e4b
Parents: e14bb60
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Sep 20 16:18:53 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Mon Sep 26 19:20:20 2016 +0000

----------------------------------------------------------------------
 build-support/tsan-suppressions.txt            | 30 ++++++++++++++++-----
 src/kudu/client/client-test.cc                 |  1 -
 src/kudu/integration-tests/alter_table-test.cc |  4 ---
 src/kudu/util/stack_watchdog-test.cc           |  3 ---
 4 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/bafbc4a2/build-support/tsan-suppressions.txt
----------------------------------------------------------------------
diff --git a/build-support/tsan-suppressions.txt b/build-support/tsan-suppressions.txt
index e492b65..65f03bf 100644
--- a/build-support/tsan-suppressions.txt
+++ b/build-support/tsan-suppressions.txt
@@ -38,15 +38,33 @@ race:epoll_ctl
 # a lot of stress testing.
 race:concurrent_btree.h
 
-# GLog's fatal signal handler isn't signal-safe -- it allocates memory.
-# This isn't great, but nothing we can do about it. See
-# https://code.google.com/p/google-glog/issues/detail?id=191
-signal:logging_fail
-
-# LOG(FATAL) from multiple threads can also end up triggering a TSAN error.
 # See https://github.com/google/glog/issues/80 for a general list of TSAN
 # issues in glog.
+# 1. glog's fatal signal handler isn't signal-safe -- it allocates memory.
+#    This isn't great, but nothing we can do about it. See
+#    https://code.google.com/p/google-glog/issues/detail?id=191
+# 2. LOG(FATAL) from multiple threads can also end up triggering a TSAN error.
+# 3. g_now_entering in stacktrace_libunwind-inl.h is reset to false without
+#    a Release_Store.
+# 4. glog's ANNOTATE_BENIGN_RACE macro doesn't do anything.
+# 5. Mutex::is_safe_ is accessed in an unsafe way.
+# 6. vlocal__ is access in an unsafe way at every VLOG() or VLOG_IS_ON()
+#    call-site.
+signal:logging_fail
 race:google::LogMessage::Init
+race:google::GetStackTrace
+race:google::InitVLOG3__
+race:glog_internal_namespace_::Mutex
+race:vlocal__
+
+# gflags variables are accessed without synchronization, but FlagSaver and other
+# APIs acquire locks when accessing them. This should be safe on x86 for
+# primitive flag types, but not for string flags, which is why fLS is omitted.
+race:fLB::
+race:fLD::
+race:fLI::
+race:fLI64::
+race:fLU64::
 
 # This method in Boost's UUID library operates on static state with impunity,
 # triggering (harmless) data races in TSAN when boost::uuids::random_generator

http://git-wip-us.apache.org/repos/asf/kudu/blob/bafbc4a2/src/kudu/client/client-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/client/client-test.cc b/src/kudu/client/client-test.cc
index 25b141a..8b8456b 100644
--- a/src/kudu/client/client-test.cc
+++ b/src/kudu/client/client-test.cc
@@ -1606,7 +1606,6 @@ int64_t SumResults(const KuduScanBatch& batch) {
 TEST_F(ClientTest, TestScannerKeepAlive) {
   ASSERT_NO_FATAL_FAILURE(InsertTestRows(client_table_.get(), 1000));
   // Set the scanner ttl really low
-  ANNOTATE_BENIGN_RACE(&FLAGS_scanner_ttl_ms, "Set at runtime, for tests.");
   FLAGS_scanner_ttl_ms = 100; // 100 milliseconds
   // Start a scan but don't get the whole data back
   KuduScanner scanner(client_table_.get());

http://git-wip-us.apache.org/repos/asf/kudu/blob/bafbc4a2/src/kudu/integration-tests/alter_table-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/alter_table-test.cc b/src/kudu/integration-tests/alter_table-test.cc
index 3f36269..20a48d7 100644
--- a/src/kudu/integration-tests/alter_table-test.cc
+++ b/src/kudu/integration-tests/alter_table-test.cc
@@ -96,10 +96,6 @@ class AlterTableTest : public KuduTest {
 
     FLAGS_enable_data_block_fsync = false; // Keep unit tests fast.
     FLAGS_use_hybrid_clock = false;
-    ANNOTATE_BENIGN_RACE(&FLAGS_flush_threshold_mb,
-                         "safe to change at runtime");
-    ANNOTATE_BENIGN_RACE(&FLAGS_enable_maintenance_manager,
-                         "safe to change at runtime");
   }
 
   void SetUp() override {

http://git-wip-us.apache.org/repos/asf/kudu/blob/bafbc4a2/src/kudu/util/stack_watchdog-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/stack_watchdog-test.cc b/src/kudu/util/stack_watchdog-test.cc
index a7cb06d..9bbb097 100644
--- a/src/kudu/util/stack_watchdog-test.cc
+++ b/src/kudu/util/stack_watchdog-test.cc
@@ -21,7 +21,6 @@
 #include <string>
 #include <vector>
 
-#include "kudu/gutil/dynamic_annotations.h"
 #include "kudu/gutil/strings/join.h"
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/stopwatch.h"
@@ -40,8 +39,6 @@ class StackWatchdogTest : public KuduTest {
   virtual void SetUp() OVERRIDE {
     KuduTest::SetUp();
     KernelStackWatchdog::GetInstance()->SaveLogsForTests(true);
-    ANNOTATE_BENIGN_RACE(&FLAGS_hung_task_check_interval_ms,
-                         "Integer flag change should be safe");
     FLAGS_hung_task_check_interval_ms = 10;
   }
 };


[6/6] kudu git commit: ensure every gflag is defined outside of a namespace

Posted by ad...@apache.org.
ensure every gflag is defined outside of a namespace

The gflags docs recommend that all gflags be defined globally, outside of any
namespace. This patch moves a couple gflags out of their respective namespaces
accordingly. It shouldn't be backwards incompatible in any way.

Change-Id: Iea2cb97539d19feae5e86f3873dab741b08e37b1
Reviewed-on: http://gerrit.cloudera.org:8080/4505
Reviewed-by: Dan Burkert <da...@cloudera.com>
Tested-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/dba7cddf
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/dba7cddf
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/dba7cddf

Branch: refs/heads/master
Commit: dba7cddf7c0867eaae24916c709c1d4405b822b6
Parents: 9bcd522
Author: Adar Dembo <ad...@cloudera.com>
Authored: Fri Sep 16 16:02:36 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Mon Sep 26 19:24:10 2016 +0000

----------------------------------------------------------------------
 src/kudu/master/master_options.cc           |  6 ++---
 src/kudu/rpc/outbound_call.cc               | 19 ++++++---------
 src/kudu/server/server_base_options.cc      |  7 +++---
 src/kudu/tablet/svg_dump.cc                 | 14 +++++------
 src/kudu/tablet/tablet-decoder-eval-test.cc | 10 ++++----
 src/kudu/tablet/tablet-test.cc              | 15 ++++++------
 src/kudu/tools/ksck.cc                      | 25 ++++++++++---------
 src/kudu/tserver/tablet_server_options.cc   |  5 ++--
 src/kudu/util/flag_tags.h                   |  2 +-
 src/kudu/util/memory/memory.cc              | 31 +++++++++++-------------
 src/kudu/util/striped64-test.cc             |  4 +--
 11 files changed, 66 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/master/master_options.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/master_options.cc b/src/kudu/master/master_options.cc
index 2a5544b..dc9d4b6 100644
--- a/src/kudu/master/master_options.cc
+++ b/src/kudu/master/master_options.cc
@@ -23,15 +23,15 @@
 #include "kudu/master/master.h"
 #include "kudu/util/flag_tags.h"
 
-namespace kudu {
-namespace master {
-
 DEFINE_string(master_addresses, "",
               "Comma-separated list of the RPC addresses belonging to all "
               "Masters in this cluster. "
               "NOTE: if not specified, configures a non-replicated Master.");
 TAG_FLAG(master_addresses, stable);
 
+namespace kudu {
+namespace master {
+
 MasterOptions::MasterOptions() {
   rpc_opts.default_port = Master::kDefaultPort;
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/rpc/outbound_call.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/outbound_call.cc b/src/kudu/rpc/outbound_call.cc
index cfa0316..2795e16 100644
--- a/src/kudu/rpc/outbound_call.cc
+++ b/src/kudu/rpc/outbound_call.cc
@@ -19,7 +19,6 @@
 #include <boost/functional/hash.hpp>
 #include <gflags/gflags.h>
 #include <mutex>
-#include <set>
 #include <string>
 #include <unordered_set>
 #include <vector>
@@ -35,16 +34,6 @@
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/kernel_stack_watchdog.h"
 
-namespace kudu {
-namespace rpc {
-
-using google::protobuf::io::CodedOutputStream;
-using google::protobuf::Message;
-using std::set;
-using strings::Substitute;
-
-static const double kMicrosPerSecond = 1000000.0;
-
 // 100M cycles should be about 50ms on a 2Ghz box. This should be high
 // enough that involuntary context switches don't trigger it, but low enough
 // that any serious blocking behavior on the reactor would.
@@ -55,6 +44,14 @@ DEFINE_int64(rpc_callback_max_cycles, 100 * 1000 * 1000,
 TAG_FLAG(rpc_callback_max_cycles, advanced);
 TAG_FLAG(rpc_callback_max_cycles, runtime);
 
+namespace kudu {
+namespace rpc {
+
+using google::protobuf::Message;
+using strings::Substitute;
+
+static const double kMicrosPerSecond = 1000000.0;
+
 ///
 /// OutboundCall
 ///

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/server/server_base_options.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/server_base_options.cc b/src/kudu/server/server_base_options.cc
index 6f7c2b4..af70488 100644
--- a/src/kudu/server/server_base_options.cc
+++ b/src/kudu/server/server_base_options.cc
@@ -18,10 +18,8 @@
 #include "kudu/server/server_base_options.h"
 
 #include <gflags/gflags.h>
-#include "kudu/util/flag_tags.h"
 
-namespace kudu {
-namespace server {
+#include "kudu/util/flag_tags.h"
 
 DEFINE_string(server_dump_info_path, "",
               "Path into which the server information will be "
@@ -41,6 +39,9 @@ DEFINE_int32(metrics_log_interval_ms, 0,
              "value, then metrics logging will be disabled.");
 TAG_FLAG(metrics_log_interval_ms, advanced);
 
+namespace kudu {
+namespace server {
+
 ServerBaseOptions::ServerBaseOptions()
   : env(Env::Default()),
     dump_info_path(FLAGS_server_dump_info_path),

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/tablet/svg_dump.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/svg_dump.cc b/src/kudu/tablet/svg_dump.cc
index 56af079..1c5f49f 100644
--- a/src/kudu/tablet/svg_dump.cc
+++ b/src/kudu/tablet/svg_dump.cc
@@ -34,13 +34,6 @@
 #include "kudu/tablet/rowset_info.h"
 #include "kudu/util/flag_tags.h"
 
-using std::ostream;
-using std::unordered_set;
-using std::vector;
-
-namespace kudu {
-namespace tablet {
-
 // Flag to dump SVGs of every compaction decision.
 //
 // After dumping, these may be converted to an animation using a series of
@@ -56,6 +49,13 @@ DEFINE_string(compaction_policy_dump_svgs_pattern, "",
               "with the compaction selection timestamp.");
 TAG_FLAG(compaction_policy_dump_svgs_pattern, hidden);
 
+using std::ostream;
+using std::unordered_set;
+using std::vector;
+
+namespace kudu {
+namespace tablet {
+
 namespace {
 
 // Organize the input rowsets into rows for presentation.  This simply

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/tablet/tablet-decoder-eval-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-decoder-eval-test.cc b/src/kudu/tablet/tablet-decoder-eval-test.cc
index e35f416..ed43024 100644
--- a/src/kudu/tablet/tablet-decoder-eval-test.cc
+++ b/src/kudu/tablet/tablet-decoder-eval-test.cc
@@ -24,6 +24,11 @@
 #include "kudu/common/schema.h"
 #include "kudu/tablet/tablet-test-base.h"
 
+DEFINE_int32(decoder_eval_test_nrepeats, 1, "Number of times to repeat per tablet");
+DEFINE_int32(decoder_eval_test_lower, 0, "Lower bound on the predicate [lower, upper)");
+DEFINE_int32(decoder_eval_test_upper, 50, "Upper bound on the predicate [lower, upper)");
+DEFINE_int32(decoder_eval_test_strlen, 10, "Number of strings per cell");
+
 namespace kudu {
 namespace tablet {
 
@@ -37,11 +42,6 @@ enum Setup {
 #endif
 };
 
-DEFINE_int32(decoder_eval_test_nrepeats, 1, "Number of times to repeat per tablet");
-DEFINE_int32(decoder_eval_test_lower, 0, "Lower bound on the predicate [lower, upper)");
-DEFINE_int32(decoder_eval_test_upper, 50, "Upper bound on the predicate [lower, upper)");
-DEFINE_int32(decoder_eval_test_strlen, 10, "Number of strings per cell");
-
 class TabletDecoderEvalTest : public KuduTabletTest,
                               public ::testing::WithParamInterface<Setup> {
 public:

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/tablet/tablet-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-test.cc b/src/kudu/tablet/tablet-test.cc
index f704f0d..21ce05c 100644
--- a/src/kudu/tablet/tablet-test.cc
+++ b/src/kudu/tablet/tablet-test.cc
@@ -31,14 +31,6 @@
 #include "kudu/util/slice.h"
 #include "kudu/util/test_macros.h"
 
-using std::shared_ptr;
-using std::unordered_set;
-
-namespace kudu {
-namespace tablet {
-
-using fs::ReadableBlock;
-
 DEFINE_int32(testflush_num_inserts, 1000,
              "Number of rows inserted in TestFlush");
 DEFINE_int32(testiterator_num_inserts, 1000,
@@ -46,6 +38,13 @@ DEFINE_int32(testiterator_num_inserts, 1000,
 DEFINE_int32(testcompaction_num_rows, 1000,
              "Number of rows per rowset in TestCompaction");
 
+using std::shared_ptr;
+
+namespace kudu {
+namespace tablet {
+
+using fs::ReadableBlock;
+
 template<class SETUP>
 class TestTablet : public TabletTestBase<SETUP> {
   typedef SETUP Type;

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/tools/ksck.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/ksck.cc b/src/kudu/tools/ksck.cc
index 270765d..21cc6ba 100644
--- a/src/kudu/tools/ksck.cc
+++ b/src/kudu/tools/ksck.cc
@@ -38,30 +38,31 @@
 #include "kudu/util/monotime.h"
 #include "kudu/util/threadpool.h"
 
-namespace kudu {
-namespace tools {
-
-using std::cout;
-using std::endl;
-using std::ostream;
-using std::shared_ptr;
-using std::string;
-using std::unordered_map;
-using strings::Substitute;
-
 DEFINE_int32(checksum_timeout_sec, 3600,
              "Maximum total seconds to wait for a checksum scan to complete "
              "before timing out.");
 DEFINE_int32(checksum_scan_concurrency, 4,
              "Number of concurrent checksum scans to execute per tablet server.");
 DEFINE_bool(checksum_snapshot, true, "Should the checksum scanner use a snapshot scan");
-DEFINE_uint64(checksum_snapshot_timestamp, ChecksumOptions::kCurrentTimestamp,
+DEFINE_uint64(checksum_snapshot_timestamp,
+              kudu::tools::ChecksumOptions::kCurrentTimestamp,
               "timestamp to use for snapshot checksum scans, defaults to 0, which "
               "uses the current timestamp of a tablet server involved in the scan");
 
 DEFINE_int32(fetch_replica_info_concurrency, 20,
              "Number of concurrent tablet servers to fetch replica info from.");
 
+namespace kudu {
+namespace tools {
+
+using std::cout;
+using std::endl;
+using std::ostream;
+using std::shared_ptr;
+using std::string;
+using std::unordered_map;
+using strings::Substitute;
+
 // The stream to write output to. If this is NULL, defaults to cout.
 // This is used by tests to capture output.
 ostream* g_err_stream = NULL;

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/tserver/tablet_server_options.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_server_options.cc b/src/kudu/tserver/tablet_server_options.cc
index 70b6fc4..7361c41 100644
--- a/src/kudu/tserver/tablet_server_options.cc
+++ b/src/kudu/tserver/tablet_server_options.cc
@@ -24,9 +24,6 @@
 #include "kudu/tserver/tablet_server.h"
 #include "kudu/util/flag_tags.h"
 
-namespace kudu {
-namespace tserver {
-
 DEFINE_string(tserver_master_addrs, "127.0.0.1:7051",
               "Comma separated addresses of the masters which the "
               "tablet server should connect to. The masters do not "
@@ -34,6 +31,8 @@ DEFINE_string(tserver_master_addrs, "127.0.0.1:7051",
               "using 'rpc_bind_addresses'.");
 TAG_FLAG(tserver_master_addrs, stable);
 
+namespace kudu {
+namespace tserver {
 
 TabletServerOptions::TabletServerOptions() {
   rpc_opts.default_port = TabletServer::kDefaultPort;

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/util/flag_tags.h
----------------------------------------------------------------------
diff --git a/src/kudu/util/flag_tags.h b/src/kudu/util/flag_tags.h
index 425fec7..d11e82d 100644
--- a/src/kudu/util/flag_tags.h
+++ b/src/kudu/util/flag_tags.h
@@ -132,7 +132,7 @@ struct FlagTags {
 // This also validates that 'tag' is a valid flag as defined in the FlagTags
 // enum above.
 #define TAG_FLAG(flag_name, tag) \
-  COMPILE_ASSERT(sizeof(FLAGS_##flag_name), flag_does_not_exist); \
+  COMPILE_ASSERT(sizeof(decltype(FLAGS_##flag_name)), flag_does_not_exist); \
   COMPILE_ASSERT(sizeof(::kudu::FlagTags::tag), invalid_tag);   \
   namespace {                                                     \
     ::kudu::flag_tags_internal::FlagTagger t_##flag_name##_##tag( \

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/util/memory/memory.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/memory/memory.cc b/src/kudu/util/memory/memory.cc
index 835ad3e..9db0464 100644
--- a/src/kudu/util/memory/memory.cc
+++ b/src/kudu/util/memory/memory.cc
@@ -20,23 +20,28 @@
 
 #include "kudu/util/memory/memory.h"
 
+#include <string.h>
+
+#include <algorithm>
+#include <cstdlib>
+
+#include <gflags/gflags.h>
+
 #include "kudu/util/alignment.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/memory/overwrite.h"
 #include "kudu/util/mem_tracker.h"
 
-#include <gflags/gflags.h>
-#include <string.h>
-
-#include <algorithm>
 using std::copy;
-using std::max;
 using std::min;
-using std::reverse;
-using std::sort;
-using std::swap;
-#include <cstdlib>
 
+// TODO(onufry) - test whether the code still tests OK if we set this to true,
+// or remove this code and add a test that Google allocator does not change it's
+// contract - 16-aligned in -c opt and %16 == 8 in debug.
+DEFINE_bool(allocator_aligned_mode, false,
+            "Use 16-byte alignment instead of 8-byte, "
+            "unless explicitly specified otherwise - to boost SIMD");
+TAG_FLAG(allocator_aligned_mode, hidden);
 
 namespace kudu {
 
@@ -77,14 +82,6 @@ void BufferAllocator::LogAllocation(size_t requested,
   }
 }
 
-// TODO(onufry) - test whether the code still tests OK if we set this to true,
-// or remove this code and add a test that Google allocator does not change it's
-// contract - 16-aligned in -c opt and %16 == 8 in debug.
-DEFINE_bool(allocator_aligned_mode, false,
-            "Use 16-byte alignment instead of 8-byte, "
-            "unless explicitly specified otherwise - to boost SIMD");
-TAG_FLAG(allocator_aligned_mode, hidden);
-
 HeapBufferAllocator::HeapBufferAllocator()
   : aligned_mode_(FLAGS_allocator_aligned_mode) {
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/dba7cddf/src/kudu/util/striped64-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/striped64-test.cc b/src/kudu/util/striped64-test.cc
index 6cabdce..fee07ca 100644
--- a/src/kudu/util/striped64-test.cc
+++ b/src/kudu/util/striped64-test.cc
@@ -25,12 +25,12 @@
 #include "kudu/util/test_util.h"
 #include "kudu/util/thread.h"
 
-namespace kudu {
-
 // These flags are used by the multi-threaded tests, can be used for microbenchmarking.
 DEFINE_int32(num_operations, 10*1000, "Number of operations to perform");
 DEFINE_int32(num_threads, 2, "Number of worker threads");
 
+namespace kudu {
+
 // Test some basic operations
 TEST(Striped64Test, TestBasic) {
   LongAdder adder;


[3/6] kudu git commit: thirdparty: patch glog to omit tests from build

Posted by ad...@apache.org.
thirdparty: patch glog to omit tests from build

The glog tests prevent glog from being built with -fsanitize=thread[1].
Since we never run them, lets just patch them out of the build.

1. https://github.com/google/glog/issues/54

Change-Id: Iadcf062c0baa1624eabc525bc39f83d8a7135e0b
Reviewed-on: http://gerrit.cloudera.org:8080/4508
Reviewed-by: Dan Burkert <da...@cloudera.com>
Tested-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/a3b54bb6
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/a3b54bb6
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/a3b54bb6

Branch: refs/heads/master
Commit: a3b54bb6780a2537a03c555a90d58fedb014a4b6
Parents: 36001f4
Author: Adar Dembo <ad...@cloudera.com>
Authored: Fri Sep 16 13:42:16 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Mon Sep 26 19:21:28 2016 +0000

----------------------------------------------------------------------
 thirdparty/download-thirdparty.sh               |   3 +-
 .../glog-issue-54-dont-build-tests.patch        | 147 +++++++++++++++++++
 2 files changed, 149 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/a3b54bb6/thirdparty/download-thirdparty.sh
----------------------------------------------------------------------
diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index 2f4c244..7265c1a 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -100,13 +100,14 @@ fetch_and_expand() {
   echo
 }
 
-GLOG_PATCHLEVEL=1
+GLOG_PATCHLEVEL=2
 delete_if_wrong_patchlevel $GLOG_DIR $GLOG_PATCHLEVEL
 if [ ! -d $GLOG_DIR ]; then
   fetch_and_expand glog-${GLOG_VERSION}.tar.gz
 
   pushd $GLOG_DIR
   patch -p0 < $TP_DIR/patches/glog-issue-198-fix-unused-warnings.patch
+  patch -p0 < $TP_DIR/patches/glog-issue-54-dont-build-tests.patch
   touch patchlevel-$GLOG_PATCHLEVEL
   autoreconf -fvi
   popd

http://git-wip-us.apache.org/repos/asf/kudu/blob/a3b54bb6/thirdparty/patches/glog-issue-54-dont-build-tests.patch
----------------------------------------------------------------------
diff --git a/thirdparty/patches/glog-issue-54-dont-build-tests.patch b/thirdparty/patches/glog-issue-54-dont-build-tests.patch
new file mode 100644
index 0000000..3d81fab
--- /dev/null
+++ b/thirdparty/patches/glog-issue-54-dont-build-tests.patch
@@ -0,0 +1,147 @@
+--- Makefile.am.orig	2016-09-16 13:39:40.053027310 -0700
++++ Makefile.am	2016-09-16 13:36:27.899844745 -0700
+@@ -52,132 +52,6 @@
+ 
+ # The libraries libglog depends on.
+ COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS)
+-# Compile switches for our unittest.
+-TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS) \
+-              $(MINGW_CFLAGS) $(AM_CXXFLAGS)
+-# Libraries for our unittest.
+-TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS)
+-
+-## unittests you want to run when people type 'make check'.
+-## TESTS is for binary unittests, check_SCRIPTS for script-based unittests.
+-## TESTS_ENVIRONMENT sets environment variables for when you run unittest,
+-## but it only seems to take effect for *binary* unittests (argh!)
+-TESTS =
+-TESTS_ENVIRONMENT =
+-check_SCRIPTS =
+-# Every time you add a unittest to check_SCRIPTS, add it here too
+-noinst_SCRIPTS =
+-# Binaries used for script-based unittests.
+-TEST_BINARIES =
+-
+-TESTS += logging_unittest
+-logging_unittest_SOURCES = $(gloginclude_HEADERS) \
+-                           src/logging_unittest.cc \
+-                           src/config_for_unittests.h \
+-                           src/mock-log.h
+-nodist_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+-logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+-logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+-
+-check_SCRIPTS += logging_striplog_test_sh
+-noinst_SCRIPTS += src/logging_striplog_test.sh
+-logging_striplog_test_sh: logging_striptest0 logging_striptest2 logging_striptest10
+-	$(top_srcdir)/src/logging_striplog_test.sh
+-
+-check_SCRIPTS += demangle_unittest_sh
+-noinst_SCRIPTS += src/demangle_unittest.sh
+-demangle_unittest_sh: demangle_unittest
+-	$(builddir)/demangle_unittest  # force to create lt-demangle_unittest
+-	$(top_srcdir)/src/demangle_unittest.sh
+-
+-check_SCRIPTS += signalhandler_unittest_sh
+-noinst_SCRIPTS += src/signalhandler_unittest.sh
+-signalhandler_unittest_sh: signalhandler_unittest
+-	$(builddir)/signalhandler_unittest  # force to create lt-signalhandler_unittest
+-	$(top_srcdir)/src/signalhandler_unittest.sh
+-
+-TEST_BINARIES += logging_striptest0
+-logging_striptest0_SOURCES = $(gloginclude_HEADERS) \
+-                             src/logging_striptest_main.cc
+-nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS)
+-logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS)
+-logging_striptest0_LDADD = libglog.la $(COMMON_LIBS)
+-
+-TEST_BINARIES += logging_striptest2
+-logging_striptest2_SOURCES = $(gloginclude_HEADERS) \
+-                             src/logging_striptest2.cc
+-nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS)
+-logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS)
+-logging_striptest2_LDADD = libglog.la $(COMMON_LIBS)
+-
+-TEST_BINARIES += logging_striptest10
+-logging_striptest10_SOURCES = $(gloginclude_HEADERS) \
+-                              src/logging_striptest10.cc
+-nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS)
+-logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS)
+-logging_striptest10_LDADD = libglog.la $(COMMON_LIBS)
+-
+-TESTS += demangle_unittest
+-demangle_unittest_SOURCES = $(gloginclude_HEADERS) \
+-                            src/demangle_unittest.cc
+-nodist_demangle_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+-demangle_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-demangle_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+-demangle_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+-
+-TESTS += stacktrace_unittest
+-stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \
+-                              src/stacktrace_unittest.cc
+-nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+-stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+-stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS)
+-
+-TESTS += symbolize_unittest
+-symbolize_unittest_SOURCES = $(gloginclude_HEADERS) \
+-                              src/symbolize_unittest.cc
+-nodist_symbolize_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+-symbolize_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-symbolize_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+-symbolize_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+-
+-TESTS += stl_logging_unittest
+-stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \
+-                               src/stl_logging_unittest.cc
+-nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+-stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+-stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+-
+-TEST_BINARIES += signalhandler_unittest
+-signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \
+-                               src/signalhandler_unittest.cc
+-nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+-signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+-signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+-
+-TESTS += utilities_unittest
+-utilities_unittest_SOURCES = $(gloginclude_HEADERS) \
+-                             src/utilities_unittest.cc
+-nodist_utilities_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
+-utilities_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-utilities_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
+-utilities_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+-
+-if HAVE_GMOCK
+-TESTS += mock_log_test
+-mock_log_test_SOURCES = $(gloginclude_HEADERS) \
+-                        src/mock-log_test.cc
+-nodist_mock_log_test_SOURCES = $(nodist_gloginclude_HEADERS)
+-mock_log_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
+-mock_log_test_LDFLAGS = $(PTHREAD_CFLAGS)
+-mock_log_test_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
+-endif
+ 
+ ## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
+ 
+@@ -212,11 +86,6 @@
+ 
+ ## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
+ 
+-
+-## This should always include $(TESTS), but may also include other
+-## binaries that you compile but don't want automatically installed.
+-noinst_PROGRAMS = $(TESTS) $(TEST_BINARIES)
+-
+ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
+ 	@cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
+ 


[4/6] kudu git commit: thirdparty: upgrade cmake to 3.6.1

Posted by ad...@apache.org.
thirdparty: upgrade cmake to 3.6.1

3.6.1 is the latest version available on the website.

The new minimum is 3.4.3 because that's the oldest version that can build
LLVM 3.9. For reference, Ubuntu 16.04 currently provides 3.5.1.

Change-Id: I8d89d02eedced4e591d0c8b6b69458abe4b62175
Reviewed-on: http://gerrit.cloudera.org:8080/4506
Reviewed-by: Dan Burkert <da...@cloudera.com>
Tested-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/1670a89f
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/1670a89f
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/1670a89f

Branch: refs/heads/master
Commit: 1670a89f4c1aff9a839efd0cb9d7eb59a355e6f1
Parents: a3b54bb
Author: Adar Dembo <ad...@cloudera.com>
Authored: Fri Sep 2 15:39:34 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Mon Sep 26 19:22:31 2016 +0000

----------------------------------------------------------------------
 CMakeLists.txt     | 6 +++---
 thirdparty/vars.sh | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/1670a89f/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b6c40a..1f04bb8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-# Require cmake that supports BYPRODUCTS in add_custom_command() [1].
+# Require cmake that can build LLVM [1].
 #
 # Note: cmake in thirdparty/ will always meet this minimum.
 #
-# 1. https://cmake.org/Bug/view.php?id=14963
-cmake_minimum_required(VERSION 3.2.0)
+# 1. http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html
+cmake_minimum_required(VERSION 3.4.3)
 
 # Prevent builds from the top-level source directory. This ensures that build
 # output is well isolated from the source tree.

http://git-wip-us.apache.org/repos/asf/kudu/blob/1670a89f/thirdparty/vars.sh
----------------------------------------------------------------------
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 37f7c25..a477abb 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -44,7 +44,7 @@ GPERFTOOLS_DIR=$TP_DIR/gperftools-$GPERFTOOLS_VERSION
 PROTOBUF_VERSION=2.6.1
 PROTOBUF_DIR=$TP_DIR/protobuf-$PROTOBUF_VERSION
 
-CMAKE_VERSION=3.2.3
+CMAKE_VERSION=3.6.1
 CMAKE_DIR=$TP_DIR/cmake-${CMAKE_VERSION}
 
 SNAPPY_VERSION=1.1.0


[5/6] kudu git commit: release_notes: prepare for 1.1

Posted by ad...@apache.org.
release_notes: prepare for 1.1

This is merely mechanical, moving the 1.0 release notes to
prior_release_notes.adoc and preparing new sections in release_notes.adoc
for 1.1.0.

Change-Id: Id9fca5e62a7179186e89ffc7249213693467f39b
Reviewed-on: http://gerrit.cloudera.org:8080/4532
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Tested-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/9bcd522a
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/9bcd522a
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/9bcd522a

Branch: refs/heads/master
Commit: 9bcd522a06fcd8326132c67cf99eedb7b732dc68
Parents: 1670a89
Author: Adar Dembo <ad...@cloudera.com>
Authored: Thu Sep 22 20:44:40 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Mon Sep 26 19:23:14 2016 +0000

----------------------------------------------------------------------
 docs/prior_release_notes.adoc | 142 +++++++++++++++++++++++++++++++++++++
 docs/release_notes.adoc       | 142 +++----------------------------------
 2 files changed, 151 insertions(+), 133 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/9bcd522a/docs/prior_release_notes.adoc
----------------------------------------------------------------------
diff --git a/docs/prior_release_notes.adoc b/docs/prior_release_notes.adoc
index 90bed78..821248c 100644
--- a/docs/prior_release_notes.adoc
+++ b/docs/prior_release_notes.adoc
@@ -28,6 +28,148 @@
 :sectlinks:
 :experimental:
 
+[[rn_1.0.0]]
+== Release notes specific to 1.0.0
+
+After approximately a year of beta releases, Apache Kudu has reached version 1.0.
+This version number signifies that the development team feels that Kudu is stable
+enough for usage in production environments.
+
+If you are new to Kudu, check out its list of link:index.html[features and benefits].
+
+[[rn_1.0.0_new_features]]
+=== New features
+
+Kudu 1.0.0 delivers a number of new features, bug fixes, and optimizations.
+
+- Removal of multiversion concurrency control (MVCC) history is now supported.
+  This is known as tablet history GC. This allows Kudu to reclaim disk space,
+  where previously Kudu would keep a full history of all changes made to a
+  given table since the beginning of time. Previously, the only way to reclaim
+  disk space was to drop a table.
++
+Kudu will still keep historical data, and the amount of history retained is
+  controlled by setting the configuration flag `--tablet_history_max_age_sec`,
+  which defaults to 15 minutes (expressed in seconds). The timestamp
+  represented by the current time minus `tablet_history_max_age_sec` is known
+  as the ancient history mark (AHM). When a compaction or flush occurs, Kudu
+  will remove the history of changes made prior to the ancient history mark.
+  This only affects historical data; currently-visible data will not be
+  removed. A specialized maintenance manager background task to remove existing
+  "cold" historical data that is not in a row affected by the normal compaction
+  process will be added in a future release.
+
+- Most of Kudu's command line tools have been consolidated under a new
+  top-level `kudu` tool. This reduces the number of large binaries distributed
+  with Kudu and also includes much-improved help output.
+
+- The Kudu Flume Sink now supports processing events containing Avro-encoded
+  records, using the new `AvroKuduOperationsProducer`.
+
+- Administrative tools including `kudu cluster ksck` now support running
+  against multi-master Kudu clusters.
+
+- The output of the `ksck` tool is now colorized and much easier to read.
+
+- The {cpp} client API now supports writing data in `AUTO_FLUSH_BACKGROUND` mode.
+  This can provide higher throughput for ingest workloads.
+
+=== Optimizations and improvements
+
+- The performance of comparison predicates on dictionary-encoded columns has
+  been substantially optimized. Users are encouraged to use dictionary encoding
+  on any string or binary columns with low cardinality, especially if these
+  columns will be filtered with predicates.
+
+- The Java client is now able to prune partitions from scanners based on the
+  provided predicates. For example, an equality predicate on a hash-partitioned
+  column will now only access those tablets that could possibly contain matching
+  data. This is expected to improve performance for the Spark integration as well
+  as applications using the Java client API.
+
+- The performance of compaction selection in the tablet server has been
+  substantially improved. This can increase the efficiency of the background
+  maintenance threads and improve overall throughput of heavy write workloads.
+
+- The policy by which the tablet server retains write-ahead log (WAL) files has
+  been improved so that it takes into account other replicas of the tablet.
+  This should help mitigate the spurious eviction of tablet replicas on machines
+  that temporarily lag behind the other replicas.
+
+=== Wire protocol compatibility
+
+Kudu 1.0.0 maintains client-server wire-compatibility with previous releases.
+Applications using the Kudu client libraries may be upgraded either
+before, at the same time, or after the Kudu servers.
+
+Kudu 1.0.0 does _not_ maintain server-server wire compatibility with previous
+releases. Therefore, rolling upgrades between earlier versions of Kudu and
+Kudu 1.0.0 are not supported.
+
+[[rn_1.0.0_incompatible_changes]]
+=== Incompatible changes in Kudu 1.0.0
+
+==== Command line tools
+
+- The `kudu-pbc-dump` tool has been removed. The same functionality is now
+  implemented as `kudu pbc dump`.
+
+- The `kudu-ksck` tool has been removed. The same functionality is now
+  implemented as `kudu cluster ksck`.
+
+- The `cfile-dump` tool has been removed. The same functionality is now
+  implemented as `kudu fs cfile dump`.
+
+- The `log-dump` tool has been removed. The same functionality is now
+  implemented as `kudu wal dump` and `kudu local_replica dump wals`.
+
+- The `kudu-admin` tool has been removed. The same functionality is now
+  implemented within `kudu table` and `kudu tablet`.
+
+- The `kudu-fs_dump` tool has been removed. The same functionality is now
+  implemented as `kudu fs dump`.
+
+- The `kudu-ts-cli` tool has been removed. The same functionality is now
+  implemented within `kudu master`, `kudu remote_replica`, and `kudu tserver`.
+
+- The `kudu-fs_list` tool has been removed and some similar useful
+  functionality has been moved under 'kudu local_replica'.
+
+==== Configuration flags
+
+- Some configuration flags are now marked as 'unsafe' and 'experimental'. Such flags
+  are disallowed by default. Users may access these flags by enabling the additional
+  flags `--unlock_unsafe_flags` and `--unlock_experimental_flags`. Usage of such flags
+  is not recommended, as the flags may be removed or modified with no deprecation period
+  and without notice in future Kudu releases.
+
+==== Client APIs ({cpp}/Java/Python)
+
+- The `TIMESTAMP` column type has been renamed to `UNIXTIME_MICROS` in order to
+  reduce confusion between Kudu's timestamp support and the timestamps supported
+  by other systems such as Apache Hive and Apache Impala (incubating). Existing
+  tables will automatically be updated to use the new name for the type.
++
+Clients upgrading to the new client libraries must move to the new name for
+  the type.  Clients using old client libraries will continue to operate using
+  the old type name, even when connected to clusters that have been
+  upgraded. Similarly, if clients are upgraded before servers, existing
+  timestamp columns will be available using the new type name.
+
+
+- `KuduSession` methods in the {cpp} library are no longer advertised as thread-safe
+  to have one set of semantics for both {cpp} and Java Kudu client libraries.
+
+- The `KuduScanToken::TabletServers` method in the {cpp} library has been removed.
+  The same information can now be found in the KuduScanToken::tablet method.
+
+==== Apache Flume Integration
+
+- The `KuduEventProducer` interface used to process Flume events into Kudu operations
+  for the Kudu Flume Sink has changed, and has been renamed `KuduOperationsProducer`.
+  The existing `KuduEventProducer`s have been updated for the new interface, and have
+  been renamed similarly.
+
 [[rn_0.10.0]]
 == Release notes specific to 0.10.0
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/9bcd522a/docs/release_notes.adoc
----------------------------------------------------------------------
diff --git a/docs/release_notes.adoc b/docs/release_notes.adoc
index 2f0da5e..a218852 100644
--- a/docs/release_notes.adoc
+++ b/docs/release_notes.adoc
@@ -16,7 +16,7 @@
 // under the License.
 
 [[release_notes]]
-= Apache Kudu 1.0 Release Notes
+= Apache Kudu 1.1 Release Notes
 
 :author: Kudu Team
 :imagesdir: ./images
@@ -28,149 +28,25 @@
 :sectlinks:
 :experimental:
 
-[[rn_1.0.0]]
+[[rn_1.1.0]]
 
-== Overview
-
-After approximately a year of beta releases, Apache Kudu has reached version 1.0.
-This version number signifies that the development team feels that Kudu is stable
-enough for usage in production environments.
-
-If you are new to Kudu, check out its list of link:index.html[features and benefits].
-
-[[rn_1.0.0_new_features]]
+[[rn_1.1.0_new_features]]
 == New features
 
-Kudu 1.0.0 delivers a number of new features, bug fixes, and optimizations.
-
-- Removal of multiversion concurrency control (MVCC) history is now supported.
-  This is known as tablet history GC. This allows Kudu to reclaim disk space,
-  where previously Kudu would keep a full history of all changes made to a
-  given table since the beginning of time. Previously, the only way to reclaim
-  disk space was to drop a table.
-+
-Kudu will still keep historical data, and the amount of history retained is
-  controlled by setting the configuration flag `--tablet_history_max_age_sec`,
-  which defaults to 15 minutes (expressed in seconds). The timestamp
-  represented by the current time minus `tablet_history_max_age_sec` is known
-  as the ancient history mark (AHM). When a compaction or flush occurs, Kudu
-  will remove the history of changes made prior to the ancient history mark.
-  This only affects historical data; currently-visible data will not be
-  removed. A specialized maintenance manager background task to remove existing
-  "cold" historical data that is not in a row affected by the normal compaction
-  process will be added in a future release.
-
-- Most of Kudu's command line tools have been consolidated under a new
-  top-level `kudu` tool. This reduces the number of large binaries distributed
-  with Kudu and also includes much-improved help output.
-
-- The Kudu Flume Sink now supports processing events containing Avro-encoded
-  records, using the new `AvroKuduOperationsProducer`.
-
-- Administrative tools including `kudu cluster ksck` now support running
-  against multi-master Kudu clusters.
-
-- The output of the `ksck` tool is now colorized and much easier to read.
-
-- The {cpp} client API now supports writing data in `AUTO_FLUSH_BACKGROUND` mode.
-  This can provide higher throughput for ingest workloads.
+XXX
 
 == Optimizations and improvements
 
-- The performance of comparison predicates on dictionary-encoded columns has
-  been substantially optimized. Users are encouraged to use dictionary encoding
-  on any string or binary columns with low cardinality, especially if these
-  columns will be filtered with predicates.
-
-- The Java client is now able to prune partitions from scanners based on the
-  provided predicates. For example, an equality predicate on a hash-partitioned
-  column will now only access those tablets that could possibly contain matching
-  data. This is expected to improve performance for the Spark integration as well
-  as applications using the Java client API.
-
-- The performance of compaction selection in the tablet server has been
-  substantially improved. This can increase the efficiency of the background
-  maintenance threads and improve overall throughput of heavy write workloads.
-
-- The policy by which the tablet server retains write-ahead log (WAL) files has
-  been improved so that it takes into account other replicas of the tablet.
-  This should help mitigate the spurious eviction of tablet replicas on machines
-  that temporarily lag behind the other replicas.
+XXX
 
 == Wire protocol compatibility
 
-Kudu 1.0.0 maintains client-server wire-compatibility with previous releases.
-Applications using the Kudu client libraries may be upgraded either
-before, at the same time, or after the Kudu servers.
-
-Kudu 1.0.0 does _not_ maintain server-server wire compatibility with previous
-releases. Therefore, rolling upgrades between earlier versions of Kudu and
-Kudu 1.0.0 are not supported.
-
-[[rn_1.0.0_incompatible_changes]]
-== Incompatible changes in Kudu 1.0.0
-
-=== Command line tools
-
-- The `kudu-pbc-dump` tool has been removed. The same functionality is now
-  implemented as `kudu pbc dump`.
-
-- The `kudu-ksck` tool has been removed. The same functionality is now
-  implemented as `kudu cluster ksck`.
-
-- The `cfile-dump` tool has been removed. The same functionality is now
-  implemented as `kudu fs cfile dump`.
-
-- The `log-dump` tool has been removed. The same functionality is now
-  implemented as `kudu wal dump` and `kudu local_replica dump wals`.
-
-- The `kudu-admin` tool has been removed. The same functionality is now
-  implemented within `kudu table` and `kudu tablet`.
-
-- The `kudu-fs_dump` tool has been removed. The same functionality is now
-  implemented as `kudu fs dump`.
-
-- The `kudu-ts-cli` tool has been removed. The same functionality is now
-  implemented within `kudu master`, `kudu remote_replica`, and `kudu tserver`.
-
-- The `kudu-fs_list` tool has been removed and some similar useful
-  functionality has been moved under 'kudu local_replica'.
-
-=== Configuration flags
-
-- Some configuration flags are now marked as 'unsafe' and 'experimental'. Such flags
-  are disallowed by default. Users may access these flags by enabling the additional
-  flags `--unlock_unsafe_flags` and `--unlock_experimental_flags`. Usage of such flags
-  is not recommended, as the flags may be removed or modified with no deprecation period
-  and without notice in future Kudu releases.
-
-=== Client APIs ({cpp}/Java/Python)
-
-- The `TIMESTAMP` column type has been renamed to `UNIXTIME_MICROS` in order to
-  reduce confusion between Kudu's timestamp support and the timestamps supported
-  by other systems such as Apache Hive and Apache Impala (incubating). Existing
-  tables will automatically be updated to use the new name for the type.
-+
-Clients upgrading to the new client libraries must move to the new name for
-  the type.  Clients using old client libraries will continue to operate using
-  the old type name, even when connected to clusters that have been
-  upgraded. Similarly, if clients are upgraded before servers, existing
-  timestamp columns will be available using the new type name.
-
-
-- `KuduSession` methods in the {cpp} library are no longer advertised as thread-safe
-  to have one set of semantics for both {cpp} and Java Kudu client libraries.
-
-- The `KuduScanToken::TabletServers` method in the {cpp} library has been removed.
-  The same information can now be found in the KuduScanToken::tablet method.
-
-=== Apache Flume Integration
+XXX
 
-- The `KuduEventProducer` interface used to process Flume events into Kudu operations
-  for the Kudu Flume Sink has changed, and has been renamed `KuduOperationsProducer`.
-  The existing `KuduEventProducer`s have been updated for the new interface, and have
-  been renamed similarly.
+[[rn_1.1.0_incompatible_changes]]
+== Incompatible changes in Kudu 1.1.0
 
+XXX
 
 [[known_issues_and_limitations]]
 == Known Issues and Limitations


[2/6] kudu git commit: c++ client: adjust kudu::client::sp

Posted by ad...@apache.org.
c++ client: adjust kudu::client::sp

In an upcoming change we'll begin using libc++ on Linux for TSAN builds. As
macOS developers are probably aware, libc++ lacks TR1 support, so we need to
extend our existing macOS-specific workaround for TR1 shared_ptrs to apply
to any libc++ build.

This has no bearing on backwards compatibility as libc++ is still only used
in non-shipping environments.

Change-Id: I01a1ef6319c3464a8ec84f066adc885da200af70
Reviewed-on: http://gerrit.cloudera.org:8080/4510
Reviewed-by: Dan Burkert <da...@cloudera.com>
Tested-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/36001f40
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/36001f40
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/36001f40

Branch: refs/heads/master
Commit: 36001f40c683d213aa1e8b35270c9796ce51979c
Parents: bafbc4a
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Sep 20 16:21:52 2016 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Mon Sep 26 19:20:52 2016 +0000

----------------------------------------------------------------------
 src/kudu/client/shared_ptr.h | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/36001f40/src/kudu/client/shared_ptr.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/shared_ptr.h b/src/kudu/client/shared_ptr.h
index fb66a4b..79155e5 100644
--- a/src/kudu/client/shared_ptr.h
+++ b/src/kudu/client/shared_ptr.h
@@ -25,18 +25,15 @@
 /// does not require c++11. We use std::tr1::shared_ptr in our public interface
 /// to hold shared instances of KuduClient, KuduSession, and KuduTable.
 ///
-/// Unfortunately, if using clang on OS X, libc++ is the default
-/// C++ standard library implementation and it is required when compiling
-/// with c++11. However, libc++ does not include the TR1 APIs. As a workaround,
-/// we use std::shared_ptr on OS X. Since OS X is for development only,
-/// it is acceptable to require clients to compile with c++11.
+/// However, if building with libc++ (e.g. if building on macOS), the TR1 APIs
+/// are not implemented. As a workaround, we use std::shared_ptr with libc++.
 ///
-/// In order to allow applications to compile against Kudu on both Linux and OS
-/// X, we provide this typedef which resolves to std::tr1::shared_ptr on Linux
-/// and std::shared_ptr on OS X. Clients are encouraged to use these typedefs in
-/// order to ensure that applications will compile on both Linux and OS X.
+/// In order to allow applications to compile against Kudu with libstdc++ as
+/// well as with libc++, macros are provided that will resolve to the correct
+/// namespace in either case. Clients are encouraged to use these macros in
+/// order to ensure that applications compile universally.
 
-#if defined(__APPLE__)
+#if defined(_LIBCPP_VERSION)
 #include <memory>
 
 namespace kudu {