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/02/14 04:26:11 UTC

[kudu] branch master updated (a981864 -> 4e2451d)

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 a981864  KUDU-2543 pt 2: pass around default authz tokens
     new 57f0dae  log_block_manager: fix invalid pointer
     new 4e2451d  [build-support] KUDU-2699 introduce TIDY build type

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:
 CMakeLists.txt                          | 16 +++++++++++-----
 build-support/jenkins/build-and-test.sh | 18 +++++++++++++++++-
 src/kudu/fs/log_block_manager.cc        |  2 +-
 3 files changed, 29 insertions(+), 7 deletions(-)


[kudu] 02/02: [build-support] KUDU-2699 introduce TIDY build type

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 4e2451dbf18db1faf9545ac1f9663d378b9f5efe
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Wed Feb 13 13:38:03 2019 -0800

    [build-support] KUDU-2699 introduce TIDY build type
    
    This changelist introduces a new TIDY build type to facilitate running
    clang_tidy_gerrit.py from the kudu-tidy-bot Jenkins job by
    jenkins.kudu.apache.org.  The idea is to make sure all auto-generated
    header files are present before running the clang-tidy tool on the
    Kudu C++ source files.
    
    As Adar noticed, our development process is such that new work goes
    into master and any commits to release branches are pure backports.
    There's not much point in running clang-tidy on those backports.
    So, the proposal is to simply run the kudu-tidy-bot job only on
    the changes in the master branch.  That entails updating the
    configuration of the kudu-tidy-bot Jenkins job after this change
    is pushed into the repo.
    
    The corresponding command for the config for the kudu-tidy-bot job is:
    ----------------------------------------------------------------------
    \#!/bin/bash
    export TIDYBOT_PASSWORD=<hidden>
    export PATH=/usr/lib/ccache:$PATH
    ccache -M 50G
    
    set -ex
    
    export BUILD_TYPE=TIDY
    build-support/jenkins/build-and-test.sh
    ----------------------------------------------------------------------
    
    Change-Id: I9b364620c9fb92202cacf0286df292dd4cc9952b
    Reviewed-on: http://gerrit.cloudera.org:8080/12471
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 CMakeLists.txt                          | 16 +++++++++++-----
 build-support/jenkins/build-and-test.sh | 18 +++++++++++++++++-
 2 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9b0394..6c08e4c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1363,15 +1363,21 @@ if (UNIX)
 endif (UNIX)
 
 ############################################################
-# "make iwyu" and "make iwyu-fix" target
+# "generated-headers" target
 ############################################################
 if (UNIX)
-  add_custom_target(iwyu-generated-headers
+  add_custom_target(generated-headers
     DEPENDS pb-gen krpc-gen hms_thrift sentry_thrift)
+endif (UNIX)
+
+############################################################
+# "make iwyu" and "make iwyu-fix" target
+############################################################
+if (UNIX)
   add_custom_target(iwyu ${BUILD_SUPPORT_DIR}/iwyu.py --from-git
-    DEPENDS iwyu-generated-headers)
+    DEPENDS generated-headers)
   add_custom_target(iwyu-fix ${BUILD_SUPPORT_DIR}/iwyu.py --fix --from-git
-    DEPENDS iwyu-generated-headers)
+    DEPENDS generated-headers)
 endif (UNIX)
 
 ############################################################
@@ -1379,7 +1385,7 @@ endif (UNIX)
 ############################################################
 if (UNIX)
   add_custom_target(tidy ${BUILD_SUPPORT_DIR}/tidy.sh)
-  add_dependencies(tidy pb-gen krpc-gen)
+  add_dependencies(tidy generated-headers)
 endif (UNIX)
 
 ############################################################
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index 5051ce6..9c0c956 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -22,7 +22,7 @@
 #
 # Environment variables may be used to customize operation:
 #   BUILD_TYPE: Default: DEBUG
-#     Maybe be one of ASAN|TSAN|DEBUG|RELEASE|COVERAGE|LINT|IWYU
+#     Maybe be one of ASAN|TSAN|DEBUG|RELEASE|COVERAGE|LINT|IWYU|TIDY
 #
 #   KUDU_ALLOW_SLOW_TESTS   Default: 1
 #     Runs the "slow" version of the unit tests. Set to 0 to
@@ -186,6 +186,13 @@ elif [ "$BUILD_TYPE" = "LINT" ]; then
 elif [ "$BUILD_TYPE" = "IWYU" ]; then
   USE_CLANG=1
   CMAKE_BUILD=debug
+elif [ "$BUILD_TYPE" = "TIDY" ]; then
+  USE_CLANG=1
+  CMAKE_BUILD=debug
+  BUILD_JAVA=0
+  BUILD_PYTHON=0
+  BUILD_PYTHON3=0
+  BUILD_GRADLE=0
 else
   # Must be DEBUG or RELEASE
   CMAKE_BUILD=$BUILD_TYPE
@@ -298,6 +305,15 @@ if [ "$BUILD_TYPE" = "IWYU" ]; then
   exit $?
 fi
 
+# Short circuit for TIDY builds: run the clang-tidy tool on the C++ source
+# files in the HEAD revision for the gerrit branch.
+if [ "$BUILD_TYPE" = "TIDY" ]; then
+  make -j$NUM_PROCS generated-headers 2>&1 | tee $TEST_LOGDIR/tidy.log
+  $SOURCE_ROOT/build-support/clang_tidy_gerrit.py HEAD 2>&1 | \
+      tee -a $TEST_LOGDIR/tidy.log
+  exit $?
+fi
+
 # Only enable test core dumps for certain build types.
 if [ "$BUILD_TYPE" != "ASAN" ]; then
   export KUDU_TEST_ULIMIT_CORE=unlimited


[kudu] 01/02: log_block_manager: fix invalid pointer

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 57f0dae3678b7514d1fcf9231f21930287ac3e13
Author: Andrew Wong <aw...@cloudera.com>
AuthorDate: Wed Feb 13 15:15:37 2019 -0800

    log_block_manager: fix invalid pointer
    
    We saw a core dump after enabling VLOGing caused by an invalid pointer
    during OpenBlock(). We seem to be dereferencing a block that has been
    moved already.
    
    Change-Id: Ic6567f43a30c74abc4fcf677671737035e845c1a
    Reviewed-on: http://gerrit.cloudera.org:8080/12477
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Reviewed-by: Hao Hao <ha...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 src/kudu/fs/log_block_manager.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/fs/log_block_manager.cc b/src/kudu/fs/log_block_manager.cc
index 52effeb..7692050 100644
--- a/src/kudu/fs/log_block_manager.cc
+++ b/src/kudu/fs/log_block_manager.cc
@@ -2060,7 +2060,7 @@ Status LogBlockManager::OpenBlock(const BlockId& block_id,
     return Status::NotFound("Can't find block", block_id.ToString());
   }
 
-  VLOG(3) << "Opened block " << (*block)->id()
+  VLOG(3) << "Opened block " << block_id
           << " from container " << lb->container()->ToString();
   block->reset(new internal::LogReadableBlock(std::move(lb)));
   return Status::OK();