caiconghui commented on a change in pull request #8387: URL: https://github.com/apache/incubator-doris/pull/8387#discussion_r821481491
########## File path: be/src/olap/tablet_manager.cpp ########## @@ -128,25 +127,26 @@ OLAPStatus TabletManager::_add_tablet_unlocked(TTabletId tablet_id, SchemaHash s } } - existed_tablet->obtain_header_rdlock(); const RowsetSharedPtr old_rowset = existed_tablet->rowset_with_max_version(); const RowsetSharedPtr new_rowset = tablet->rowset_with_max_version(); - - // If new tablet is empty, it is a newly created schema change tablet. - // the old tablet is dropped before add tablet. it should not exist old tablet - if (new_rowset == nullptr) { - existed_tablet->release_header_lock(); - // it seems useless to call unlock and return here. - // it could prevent error when log level is changed in the future. - LOG(FATAL) << "new tablet is empty and old tablet exists. it should not happen." - << " tablet_id=" << tablet_id << " schema_hash=" << schema_hash; - return OLAP_ERR_ENGINE_INSERT_EXISTS_TABLE; + int64_t old_time, new_time; + int32_t old_version, new_version; + { + ReadLock rdlock(existed_tablet->get_header_lock()); Review comment: my fault, I will fix it -- 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