fix restore major sstable count maybe greater than one in DDL scenario
This commit is contained in:
@ -1298,9 +1298,6 @@ int ObTabletCopyFinishTask::create_new_table_store_with_major_()
|
||||
LOG_WARN("src tablet meta should not be null", K(ret));
|
||||
} else if (major_tables_handle_.empty()) {
|
||||
// do nothing
|
||||
} else if (ObTabletRestoreAction::is_restore_major(restore_action_) && 1 != major_tables_handle_.get_count() ) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("major tablet should only has one sstable", K(ret), "major_sstable_count", major_tables_handle_.get_count(), K(major_tables_handle_));
|
||||
} else if (OB_FAIL(ObStorageHATabletBuilderUtil::build_tablet_with_major_tables(ls_,
|
||||
tablet_id_, major_tables_handle_, src_tablet_meta_->storage_schema_, src_tablet_meta_->medium_info_list_))) {
|
||||
LOG_WARN("failed to build tablet with major tables", K(ret), K(tablet_id_), K(major_tables_handle_), KPC(src_tablet_meta_));
|
||||
|
@ -1359,6 +1359,9 @@ int ObCopySSTableInfoRestoreReader::inner_get_backup_sstable_metas_(
|
||||
} else if (OB_FAIL(backup::ObLSBackupRestoreUtil::read_sstable_metas(sstable_meta_backup_path.get_obstr(),
|
||||
restore_base_info_->backup_dest_.get_storage_info(), sstable_meta_index, backup_sstable_meta_array))) {
|
||||
LOG_WARN("failed to read sstable meta", K(ret), KPC(restore_base_info_));
|
||||
} else if (data_type.is_major_backup() && backup_sstable_meta_array.count() > 1) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("major tablet should only has one sstable", K(ret), K(tablet_id), K(sstable_meta_index), K(backup_sstable_meta_array));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user