diff --git a/src/storage/backup/ob_backup_utils.cpp b/src/storage/backup/ob_backup_utils.cpp index 0bd6f3442..a47743be7 100644 --- a/src/storage/backup/ob_backup_utils.cpp +++ b/src/storage/backup/ob_backup_utils.cpp @@ -2103,7 +2103,11 @@ int ObBackupTabletProvider::check_tablet_continuity_(const share::ObLSID &ls_id, const ObTabletMeta &cur_tablet_meta = tablet_handle.get_obj()->get_tablet_meta(); const int64_t cur_snapshot_version = cur_tablet_meta.report_status_.merge_snapshot_version_; const int64_t prev_backup_snapshot_version = prev_backup_tablet_meta.tablet_meta_.report_status_.merge_snapshot_version_; - if (cur_snapshot_version < prev_backup_snapshot_version) { + if ((prev_backup_snapshot_version <= 0 && prev_backup_tablet_meta.tablet_meta_.table_store_flag_.with_major_sstable()) + || (cur_snapshot_version <= 0 && cur_tablet_meta.table_store_flag_.with_major_sstable())) { + ret = OB_ERR_UNEXPECTED; + LOG_WARN("prev or current snapshot version should not be invalid", K(ret), K(cur_tablet_meta), K(prev_backup_tablet_meta)); + } else if (cur_snapshot_version < prev_backup_snapshot_version) { ret = OB_BACKUP_MAJOR_NOT_COVER_MINOR; LOG_WARN("tablet is not valid", K(ret), K(cur_tablet_meta), K(prev_backup_tablet_meta)); } else { diff --git a/src/storage/tablet/ob_tablet.cpp b/src/storage/tablet/ob_tablet.cpp index e749c92f6..f5cc4954c 100644 --- a/src/storage/tablet/ob_tablet.cpp +++ b/src/storage/tablet/ob_tablet.cpp @@ -2138,7 +2138,8 @@ int ObTablet::try_update_table_store_flag(const ObUpdateTableStoreParam ¶m) return ret; } -int ObTablet::build_migration_tablet_param(ObMigrationTabletParam &mig_tablet_param) const +int ObTablet::build_migration_tablet_param( + ObMigrationTabletParam &mig_tablet_param) const { int ret = OB_SUCCESS; @@ -2168,7 +2169,7 @@ int ObTablet::build_migration_tablet_param(ObMigrationTabletParam &mig_tablet_pa mig_tablet_param.ddl_execution_id_ = tablet_meta_.ddl_execution_id_; mig_tablet_param.ddl_data_format_version_ = tablet_meta_.ddl_data_format_version_; mig_tablet_param.ddl_commit_scn_ = tablet_meta_.ddl_commit_scn_; - mig_tablet_param.report_status_.reset(); + mig_tablet_param.report_status_ = tablet_meta_.report_status_; if (OB_FAIL(mig_tablet_param.storage_schema_.init(mig_tablet_param.allocator_, storage_schema_))) { LOG_WARN("failed to copy storage schema", K(ret), K_(tablet_meta)); diff --git a/src/storage/tablet/ob_tablet.h b/src/storage/tablet/ob_tablet.h index e5950729e..1011f5dda 100644 --- a/src/storage/tablet/ob_tablet.h +++ b/src/storage/tablet/ob_tablet.h @@ -287,7 +287,8 @@ public: // migration section // used for migration source generating create tablet rpc argument - int build_migration_tablet_param(ObMigrationTabletParam &mig_tablet_param) const; + int build_migration_tablet_param( + ObMigrationTabletParam &mig_tablet_param) const; int build_migration_sstable_param( const ObITable::TableKey &table_key, blocksstable::ObMigrationSSTableParam &mig_sstable_param) const; diff --git a/src/storage/tablet/ob_tablet_meta.cpp b/src/storage/tablet/ob_tablet_meta.cpp index b41d8b441..f329c84a7 100644 --- a/src/storage/tablet/ob_tablet_meta.cpp +++ b/src/storage/tablet/ob_tablet_meta.cpp @@ -235,7 +235,7 @@ int ObTabletMeta::init( snapshot_version_ = param.snapshot_version_; multi_version_start_ = param.multi_version_start_; compat_mode_ = param.compat_mode_; - report_status_ = param.report_status_; + report_status_.reset(); tx_data_ = param.tx_data_; table_store_flag_ = param.table_store_flag_; ddl_start_scn_ = param.ddl_start_scn_;