This is an automated email from the ASF dual-hosted git repository. weizuo pushed a commit to branch dev-1.1.2 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push: new 07b7048faa [Bug](tablet) Fix bug that segment files are removed as trash but tablet meta is normal (#10721) 07b7048faa is described below commit 07b7048faacc6e5bc6af1b73597b643b767d0f4d 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 66d4031fe9..041124ea61 100644 --- a/be/src/olap/tablet_manager.cpp +++ b/be/src/olap/tablet_manager.cpp @@ -160,6 +160,16 @@ OLAPStatus TabletManager::_add_tablet_unlocked(TTabletId tablet_id, SchemaHash s res = _add_tablet_to_map_unlocked(tablet_id, schema_hash, 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 = 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