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 2023/02/02 04:52:58 UTC

[kudu] branch master updated: [KUDU-3438] TabletCopyClientAbortTest might crash

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 f96976128 [KUDU-3438] TabletCopyClientAbortTest might crash
f96976128 is described below

commit f96976128223fde03e2c254487051edd2abc5902
Author: xinghuayu007 <14...@qq.com>
AuthorDate: Thu Jan 26 19:54:27 2023 +0800

    [KUDU-3438] TabletCopyClientAbortTest might crash
    
    TabletCopyClientTest::SetUp() of TabletCopyClientAbortTest may fail,
    for example, because of the full disk. TabletCopyClient will be not
    initialized. Therefore using TabletCopyClient in StartCopy() will
    cause a crash.
    
    It is better to Add NO_FATALS() for TabletCopyClientTest::SetUp()
    to avoid nullptr TabletCopyClient.
    
    Change-Id: Id1eeea183bf9fc0b566e6a70f2f7520f34b2ae3c
    Reviewed-on: http://gerrit.cloudera.org:8080/19451
    Reviewed-by: Yingchun Lai <la...@apache.org>
    Reviewed-by: Alexey Serbin <al...@apache.org>
    Tested-by: Kudu Jenkins
---
 src/kudu/tserver/tablet_copy_client-test.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/kudu/tserver/tablet_copy_client-test.cc b/src/kudu/tserver/tablet_copy_client-test.cc
index 633495cfc..6fff5dbe3 100644
--- a/src/kudu/tserver/tablet_copy_client-test.cc
+++ b/src/kudu/tserver/tablet_copy_client-test.cc
@@ -26,6 +26,7 @@
 #include <string>
 #include <thread>
 #include <tuple>
+#include <type_traits>
 #include <vector>
 
 #include <gflags/gflags.h>
@@ -38,7 +39,7 @@
 #include "kudu/consensus/consensus_meta_manager.h"
 #include "kudu/consensus/log.h"
 #include "kudu/consensus/log_anchor_registry.h"
-#include "kudu/consensus/log_reader.h"
+#include "kudu/consensus/log_reader.h" // IWYU pragma: keep
 #include "kudu/consensus/log_util.h"
 #include "kudu/consensus/metadata.pb.h"
 #include "kudu/consensus/quorum_util.h"
@@ -595,7 +596,7 @@ class TabletCopyClientAbortTest : public TabletCopyClientTest,
   }
 
   void SetUp() override {
-    TabletCopyClientTest::SetUp();
+    NO_FATALS(TabletCopyClientTest::SetUp());
     ASSERT_OK(StartCopy());
   }
  protected: