[
https://issues.apache.org/jira/browse/KUDU-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17629429#comment-17629429
]
Yingchun Lai commented on KUDU-3419:
------------------------------------
when tserver shutdown, all internal objects will shutdown too, why need manual
shutdown tablet_manager_?
{code:java}
TabletServer::~TabletServer() {
ShutdownImpl();
}
void TabletServer::ShutdownImpl() {
if (kInitialized == state_ || kRunning == state_) {
const string name = rpc_server_->ToString();
LOG(INFO) << "TabletServer@" << name << " shutting down...";
// 1. Stop accepting new RPCs.
UnregisterAllServices();
// 2. Shut down the tserver's subsystems.
maintenance_manager_->Shutdown();
WARN_NOT_OK(heartbeater_->Stop(), "Failed to stop TS Heartbeat thread");
fs_manager_->UnsetErrorNotificationCb(ErrorHandlerType::DISK_ERROR);
fs_manager_->UnsetErrorNotificationCb(ErrorHandlerType::CFILE_CORRUPTION);
tablet_manager_->Shutdown(); // <====== tablet_manager_
will be shutdown
client_initializer_->Shutdown();
// 3. Shut down generic subsystems.
KuduServer::Shutdown();
LOG(INFO) << "TabletServer@" << name << " shutdown complete.";
}
state_ = kStopped;
} {code}
> Tablet server maybe get stuck when loading tablet metadata failed
> -----------------------------------------------------------------
>
> Key: KUDU-3419
> URL: https://issues.apache.org/jira/browse/KUDU-3419
> Project: Kudu
> Issue Type: Bug
> Reporter: Xixu Wang
> Priority: Major
> Attachments: image-2022-11-04-14-57-49-684.png,
> image-2022-11-04-14-59-54-665.png, image-2022-11-04-15-25-05-437.png,
> image-2022-11-04-15-29-27-092.png, image-2022-11-04-15-30-08-892.png,
> image-2022-11-04-15-32-34-366.png
>
>
> Tablet server maybe get stuck when loading tablet metadata failed.
> The follow steps repeat the bug.
> 1. Change the permission of one tablet meta file to root. We use account:
> *kudu* to run Kudu.
> !image-2022-11-04-14-57-49-684.png!
> 2.Start an instance of tablet server. A permission erro will be saw:
> !image-2022-11-04-15-29-27-092.png!
> 3. Tablet server gets stuck and will not exit automatically.
> !image-2022-11-04-15-30-08-892.png!
> 4. Pstack is as follow:
> As we can see. Tablet Server can not exit, because ThreadPool can not be
> shutdown. TxnStatlessTrasckerTask is running, which cause threadpool can not
> be shutdown.
> !image-2022-11-04-15-32-34-366.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)