From c910ff1726b569a21e7d094b2c2b02c78c60bb0e Mon Sep 17 00:00:00 2001 From: sevev Date: Fri, 20 Sep 2024 18:57:54 +0800 Subject: [PATCH] update Signed-off-by: sevev --- be/src/storage/base_tablet.h | 4 ++-- be/src/storage/tablet.h | 3 +-- be/src/storage/tablet_manager.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/be/src/storage/base_tablet.h b/be/src/storage/base_tablet.h index 5ba6600c9497bb..3ceb675829d1bc 100644 --- a/be/src/storage/base_tablet.h +++ b/be/src/storage/base_tablet.h @@ -117,9 +117,9 @@ class BaseTablet : public std::enable_shared_from_this { virtual size_t num_rows() const = 0; -protected: virtual void on_shutdown() {} - + +protected: void _gen_tablet_path(); TabletState _state; diff --git a/be/src/storage/tablet.h b/be/src/storage/tablet.h index 9f75b19d208983..e7892d7a79d3d2 100644 --- a/be/src/storage/tablet.h +++ b/be/src/storage/tablet.h @@ -334,8 +334,7 @@ class Tablet : public BaseTablet { [[nodiscard]] bool is_dropping() const { return _is_dropping; } // set true when start to drop tablet. only set in `TabletManager::drop_tablet` right now void set_is_dropping(bool is_dropping) { _is_dropping = is_dropping; } - -protected: + void on_shutdown() override; private: diff --git a/be/src/storage/tablet_manager.cpp b/be/src/storage/tablet_manager.cpp index f844dac73c997a..263f12e3457a07 100644 --- a/be/src/storage/tablet_manager.cpp +++ b/be/src/storage/tablet_manager.cpp @@ -446,7 +446,7 @@ Status TabletManager::drop_tablet(TTabletId tablet_id, TabletDropFlag flag) { // 1. drop and clone a new tablet with the same tablet_id. // 2. compact rocksdb meta and reload tablet again. std::unique_lock l(dropped_tablet->get_header_lock()); - dropped_tablet->on_shutdown(); + dropped_tablet->updates()->on_shutdown(); } } // erase tablet from tablet map