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