This is an automated email from the ASF dual-hosted git repository. weizuo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 39325bd666 [Bug](tablet) Fix bug that segment files are removed as trash but tablet meta is normal (#10721) 39325bd666 is described below commit 39325bd66618adcfb826707d3d82aec4926cb330 Author: weizuo93 <wei...@apache.org> AuthorDate: Fri Jul 15 11:07:16 2022 +0800 [Bug](tablet) Fix bug that segment files are removed as trash but tablet meta is normal (#10721) --- be/src/olap/tablet_manager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/be/src/olap/tablet_manager.cpp b/be/src/olap/tablet_manager.cpp index 5c4cd04a17..f61b0cc06a 100644 --- a/be/src/olap/tablet_manager.cpp +++ b/be/src/olap/tablet_manager.cpp @@ -161,6 +161,16 @@ Status TabletManager::_add_tablet_unlocked(TTabletId tablet_id, const TabletShar res = _add_tablet_to_map_unlocked(tablet_id, tablet, update_meta, keep_files, true /*drop_old*/); } else { + tablet->set_tablet_state(TABLET_SHUTDOWN); + tablet->save_meta(); + { + std::lock_guard<std::shared_mutex> shutdown_tablets_wrlock(_shutdown_tablets_lock); + _shutdown_tablets.push_back(tablet); + } + LOG(INFO) << "set tablet to shutdown state." + << "tablet_id=" << tablet->tablet_id() + << ", tablet_path=" << tablet->tablet_path(); + res = Status::OLAPInternalError(OLAP_ERR_ENGINE_INSERT_OLD_TABLET); } LOG(WARNING) << "add duplicated tablet. force=" << force << ", res=" << res --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org