yujun777 commented on code in PR #34889: URL: https://github.com/apache/doris/pull/34889#discussion_r1625310457
########## be/src/olap/tablet_manager.cpp: ########## @@ -1140,6 +1144,20 @@ Status TabletManager::start_trash_sweep() { } bool TabletManager::_move_tablet_to_trash(const TabletSharedPtr& tablet) { + TabletSharedPtr tablet_in_not_shutdown = get_tablet(tablet->tablet_id()); + if (tablet_in_not_shutdown) { + TSchemaHash schema_hash_not_shutdown = tablet_in_not_shutdown->schema_hash(); + size_t path_hash_not_shutdown = tablet_in_not_shutdown->data_dir()->path_hash(); + if (tablet->schema_hash() == schema_hash_not_shutdown && + tablet->data_dir()->path_hash() == path_hash_not_shutdown) { + tablet->clear_cache(); Review Comment: ``` if (tablet_in_not_shutdown.tablet_path() != tablet.tablet_path()) { return data_dir->move_to_trash(tablet_in_not_shutdown.tablet_path()); } else { return true; } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org