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 2022/04/08 15:07:55 UTC

[kudu] branch master updated (ed04c8b6f -> 49e0d6d42)

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 ed04c8b6f [UT] Fix env-test resource limit overflow
     new fe2ba596d [cmake_modules] add '-o /dev/null' to the linker command
     new 49e0d6d42 [tests] make one scenario of client-test more stable

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:
 cmake_modules/KuduLinker.cmake |  2 +-
 src/kudu/client/client-test.cc | 16 ++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)


[kudu] 01/02: [cmake_modules] add '-o /dev/null' to the linker command

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 fe2ba596dda3872789de8d42ccc2b82b6db42d47
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Thu Apr 7 15:06:51 2022 -0700

    [cmake_modules] add '-o /dev/null' to the linker command
    
    I noticed that every time I run cmake in the build directory
    on macOS, a.out file appears.  It turned out it's generated
    by the GET_LINKER_VERSION procedure from KuduLinker.cmake.
    
    This patch add '-o /dev/null' to the command that determines
    the version of the linker to avoid generating a.out file
    in the current working directory.
    
    Change-Id: Id095902679a2f0e2648c45bcd4024fc734b9a1e7
    Reviewed-on: http://gerrit.cloudera.org:8080/18394
    Tested-by: Alexey Serbin <al...@apache.org>
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
 cmake_modules/KuduLinker.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake_modules/KuduLinker.cmake b/cmake_modules/KuduLinker.cmake
index d8dacfc21..0725bb03d 100644
--- a/cmake_modules/KuduLinker.cmake
+++ b/cmake_modules/KuduLinker.cmake
@@ -113,7 +113,7 @@ function(GET_LINKER_VERSION)
     set(ld_version_flag "--version")
   endif()
   execute_process(
-    COMMAND ${CMAKE_CXX_COMPILER} "-Wl,${ld_version_flag}" ${ARGN}
+    COMMAND ${CMAKE_CXX_COMPILER} "-Wl,${ld_version_flag}" -o /dev/null ${ARGN}
     ERROR_VARIABLE LINKER_STDERR
     OUTPUT_VARIABLE LINKER_STDOUT
     RESULT_VARIABLE LINKER_EXITCODE)


[kudu] 02/02: [tests] make one scenario of client-test more stable

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 49e0d6d428eed80dd8d96ab191c2d5062a9ed5dd
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Thu Apr 7 17:37:22 2022 -0700

    [tests] make one scenario of client-test more stable
    
    This patch makes ClientTest.TestScannerKeepAlive more stable.
    
    The motivation for this patch was seeing the following test
    failure in a TSAN build [1]:
    
      src/kudu/client/client-test.cc:2763
      Failed
      Bad status: Not found: Scanner 0d9072070e4443ba8c49b089806415b4 not found (it may have expired)
    
    Before: 2 out of 32 failed
      http://dist-test.cloudera.org/job?job_id=aserbin.1649379879.23423
    
    After:  0 out of 32 failed
      http://dist-test.cloudera.org/job?job_id=aserbin.1649381490.37476
    
    [1] http://jenkins.kudu.apache.org/job/kudu-gerrit/25299/BUILD_TYPE=TSAN
    
    Change-Id: Ia7ebddc5499d59e37282e4f1e6513bc5f83cdb8a
    Reviewed-on: http://gerrit.cloudera.org:8080/18396
    Reviewed-by: Yingchun Lai <ac...@gmail.com>
    Tested-by: Alexey Serbin <al...@apache.org>
---
 src/kudu/client/client-test.cc | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/kudu/client/client-test.cc b/src/kudu/client/client-test.cc
index 75b2bce1d..c8597bd29 100644
--- a/src/kudu/client/client-test.cc
+++ b/src/kudu/client/client-test.cc
@@ -2722,9 +2722,11 @@ int64_t SumResults(const KuduScanBatch& batch) {
 } // anonymous namespace
 
 TEST_F(ClientTest, TestScannerKeepAlive) {
+  SKIP_IF_SLOW_NOT_ALLOWED();
+
   NO_FATALS(InsertTestRows(client_table_.get(), 1000));
-  // Set the scanner ttl really low
-  FLAGS_scanner_ttl_ms = 100; // 100 milliseconds
+  // Set the scanner TTL low.
+  FLAGS_scanner_ttl_ms = 500;
   // Start a scan but don't get the whole data back
   KuduScanner scanner(client_table_.get());
   // This will make sure we have to do multiple NextBatch calls to the second tablet.
@@ -2756,9 +2758,11 @@ TEST_F(ClientTest, TestScannerKeepAlive) {
   sum += SumResults(batch);
   ASSERT_TRUE(scanner.HasMoreRows());
 
-  // Now loop while keeping the scanner alive. Each time we loop we sleep 1/2 a scanner
-  // ttl interval (the garbage collector is running each 50 msecs too.).
-  for (int i = 0; i < 5; i++) {
+  // Now loop while keeping the scanner alive. Each loop we sleep about 1/10
+  // of the scanner's TTL interval to avoid flakiness due to scheduling
+  // anomalies. The garbage collector runs each 50 msec as well in this test
+  // scenario (controlled by FLAGS_scanner_gc_check_interval_us).
+  for (int i = 0; i < 15; i++) {
     SleepFor(MonoDelta::FromMilliseconds(50));
     ASSERT_OK(scanner.KeepAlive());
   }
@@ -2772,7 +2776,7 @@ TEST_F(ClientTest, TestScannerKeepAlive) {
   }
 
   ASSERT_TRUE(scanner.HasMoreRows());
-  for (int i = 0; i < 5; i++) {
+  for (int i = 0; i < 15; i++) {
     SleepFor(MonoDelta::FromMilliseconds(50));
     ASSERT_OK(scanner.KeepAlive());
   }