diff --git a/dbms/src/Flash/ResourceControl/LocalAdmissionController.h b/dbms/src/Flash/ResourceControl/LocalAdmissionController.h index 2de6aa21d73..1886cca0c17 100644 --- a/dbms/src/Flash/ResourceControl/LocalAdmissionController.h +++ b/dbms/src/Flash/ResourceControl/LocalAdmissionController.h @@ -442,7 +442,19 @@ class LocalAdmissionController final : private boost::noncopyable background_threads.emplace_back([this] { this->watchGAC(); }); } - ~LocalAdmissionController() { stop(); } + ~LocalAdmissionController() { safeStop(); } + + void safeStop() + { + try + { + stop(); + } + catch (...) + { + LOG_ERROR(log, "stop server id({}) failed: {}", unique_client_id, getCurrentExceptionMessage(false)); + } + } void consumeCPUResource(const std::string & name, double ru, uint64_t cpu_time_in_ns) {