kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From granthe...@apache.org
Subject [kudu] branch branch-1.10.x updated: [tserver] Fix bug in AlterSchemaTransactionState::ToString
Date Wed, 03 Jul 2019 00:35:58 GMT
This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch branch-1.10.x
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/branch-1.10.x by this push:
     new 0895ff3  [tserver] Fix bug in AlterSchemaTransactionState::ToString
0895ff3 is described below

commit 0895ff3195eff099bc1083076847f08f7c9b3f4c
Author: Xiaokai Wang <xiaokai.wang@live.com>
AuthorDate: Tue Jul 2 21:26:57 2019 +0800

    [tserver] Fix bug in AlterSchemaTransactionState::ToString
    
    The error_ condition is reversed, When error is null the tserver will crash.
    
    Stacktrace:
    0x21f5dcc google::protobuf::TextFormat::Printer::Print()
    0x21f5e6d google::protobuf::TextFormat::Printer::PrintToString()
    0x204e335 kudu::pb_util::SecureShortDebugString()
    0xbeae76 kudu::tablet::AlterSchemaTransactionState::ToString()
    0xbead3f kudu::tablet::AlterSchemaTransaction::ToString()
    0xbedaea kudu::tablet::TransactionDriver::ToString()
    0xbf41e1 kudu::tablet::TransactionTracker::WaitForAllToFinish()
    0xbf496f kudu::tablet::TransactionTracker::WaitForAllToFinish()
    0xbe543f kudu::tablet::TabletReplica::Stop()
    0x9cd198 kudu::tserver::TSTabletManager::DeleteTablet()
    0x9d2f5f kudu::tserver::DeleteTabletRunnable::Run()
    0x207365f kudu::ThreadPool::DispatchThread()
    0x2068ec4 kudu::Thread::SuperviseThread()
    0x7f01548b2dc5 start_thread
    0x7f0152b8dced __clone
    
    Deleting old range partion, which will wait for all txns to finish.
    If being dumped txns contains 'AlterSchema-TXN', the tserver will crash.
    
    Change-Id: I7126edcdddae9cf21d343e6c6c219a003edb1be1
    Reviewed-on: http://gerrit.cloudera.org:8080/13782
    Tested-by: Kudu Jenkins
    Reviewed-by: Andrew Wong <awong@cloudera.com>
    Reviewed-by: Grant Henke <granthenke@apache.org>
    (cherry picked from commit 81f0dbf99ac2114a29431f49fa2ef480e7ef26c4)
    Reviewed-on: http://gerrit.cloudera.org:8080/13784
---
 src/kudu/tablet/transactions/alter_schema_transaction.cc | 2 +-
 src/kudu/tablet/transactions/alter_schema_transaction.h  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/kudu/tablet/transactions/alter_schema_transaction.cc b/src/kudu/tablet/transactions/alter_schema_transaction.cc
index 4da364e..f988a4c 100644
--- a/src/kudu/tablet/transactions/alter_schema_transaction.cc
+++ b/src/kudu/tablet/transactions/alter_schema_transaction.cc
@@ -75,7 +75,7 @@ string AlterSchemaTransactionState::ToString() const {
                     has_timestamp() ? timestamp().ToString() : "<unassigned>",
                     schema_ == nullptr ? "(none)" : schema_->ToString(),
                     request_ == nullptr ? "(none)" : SecureShortDebugString(*request_),
-                    error_ ? "(none)" : SecureShortDebugString(error_->failed_status()));
+                    error_ ? SecureShortDebugString(error_->failed_status()) : "(none)");
 }
 
 AlterSchemaTransaction::AlterSchemaTransaction(unique_ptr<AlterSchemaTransactionState>
state,
diff --git a/src/kudu/tablet/transactions/alter_schema_transaction.h b/src/kudu/tablet/transactions/alter_schema_transaction.h
index 5ef3dd6..69b9c31 100644
--- a/src/kudu/tablet/transactions/alter_schema_transaction.h
+++ b/src/kudu/tablet/transactions/alter_schema_transaction.h
@@ -24,6 +24,7 @@
 
 #include <boost/optional/optional.hpp>
 
+#include "kudu/common/common.pb.h"
 #include "kudu/consensus/consensus.pb.h"
 #include "kudu/gutil/gscoped_ptr.h"
 #include "kudu/gutil/macros.h"


Mime
View raw message