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 eba54241ab54fd8522fa7a48561000ec7917d7df
Author: hahao <[email protected]>
AuthorDate: Mon Feb 1 14:46:42 2021 -0800

    KUDU-2612: follow up of commit c033487
    
    This patch address leftover comments for commit c033487.
    
    Change-Id: I3ac5c1c123e33d60bc7c23dec015072d5c5ed9fd
    Reviewed-on: http://gerrit.cloudera.org:8080/17013
    Reviewed-by: Hao Hao <[email protected]>
    Reviewed-by: Alexey Serbin <[email protected]>
    Tested-by: Kudu Jenkins
---
 src/kudu/integration-tests/txn_status_table-itest.cc | 3 +--
 src/kudu/tserver/ts_tablet_manager.cc                | 4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/kudu/integration-tests/txn_status_table-itest.cc 
b/src/kudu/integration-tests/txn_status_table-itest.cc
index 0311050..eeb469a 100644
--- a/src/kudu/integration-tests/txn_status_table-itest.cc
+++ b/src/kudu/integration-tests/txn_status_table-itest.cc
@@ -746,8 +746,7 @@ TEST_F(MultiServerTxnStatusTableITest, 
TestSystemClientCrashedNodes) {
   ASSERT_FALSE(leader_uuid.empty());
   FLAGS_leader_failure_max_missed_heartbeat_periods = 1;
   cluster_->mini_tablet_server_by_uuid(leader_uuid)->Shutdown();
-  int txn_id = 2;
-  ASSERT_OK(txn_sys_client_->BeginTransaction(++txn_id, kUser));
+  ASSERT_OK(txn_sys_client_->BeginTransaction(2, kUser));
 }
 
 enum InjectedErrorType {
diff --git a/src/kudu/tserver/ts_tablet_manager.cc 
b/src/kudu/tserver/ts_tablet_manager.cc
index cee4476..2ebf1cf 100644
--- a/src/kudu/tserver/ts_tablet_manager.cc
+++ b/src/kudu/tserver/ts_tablet_manager.cc
@@ -1458,7 +1458,9 @@ void TSTabletManager::TxnStalenessTrackerTask() {
       if (!l.first_failed_status().ok()) {
         VLOG(1) << "Skipping transaction staleness track task: "
                 << l.first_failed_status().ToString();
-        continue;
+        // Since it is very likely the leader lock check will fail for the rest
+        // replicas, we can end this round of checking earlier.
+        break;
       }
       coordinator->AbortStaleTransactions();
     }

Reply via email to