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 2025/01/06 17:56:16 UTC
(kudu) branch master updated: KUDU-3631 Fix Master shutdown
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 d3f6170fc KUDU-3631 Fix Master shutdown
d3f6170fc is described below
commit d3f6170fcea3a4044e9f9d89d6bb073d0a66eb66
Author: Ádám Bakai <ab...@cloudera.com>
AuthorDate: Wed Dec 18 12:48:12 2024 +0100
KUDU-3631 Fix Master shutdown
TSAN gave a warning because CountDownLatch::WaitUntil() and
CountDownLatch::~CountDownLatch() were running at the same time. The
solution is to set it to zero and wait until the deleter thread relying
on the latch is also joined,
Change-Id: Iebcdd22dca27c4b0dcbeecf7d87e88c923eedaa8
Reviewed-on: http://gerrit.cloudera.org:8080/22158
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
---
src/kudu/master/master.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/kudu/master/master.cc b/src/kudu/master/master.cc
index 484094704..9f7fa7dc9 100644
--- a/src/kudu/master/master.cc
+++ b/src/kudu/master/master.cc
@@ -547,6 +547,12 @@ void Master::ShutdownImpl() {
fs_manager_->UnsetErrorNotificationCb(ErrorHandlerType::KUDU_2233_CORRUPTION);
fs_manager_->UnsetErrorNotificationCb(ErrorHandlerType::CFILE_CORRUPTION);
fs_manager_->UnsetErrorNotificationCb(ErrorHandlerType::DISK_ERROR);
+ if (expired_reserved_tables_deleter_thread_) {
+ // Set the countdown latch to zero to trigger expired_reserved_tables_deleter_thread_
+ // to stop. Then wait for the thread to actually stop.
+ stop_background_threads_latch_.Reset(0);
+ expired_reserved_tables_deleter_thread_->Join();
+ }
// 3. Shut down generic subsystems.
KuduServer::Shutdown();