Fix restore copy minor sstable which is same with dest minor sstable condition
This commit is contained in:
parent
2032dc8477
commit
38b30d15f6
@ -1183,7 +1183,6 @@ int ObStartCompleteMigrationTask::update_ls_migration_status_hold_()
|
||||
int ret = OB_SUCCESS;
|
||||
ObLS *ls = nullptr;
|
||||
const ObMigrationStatus hold_status = ObMigrationStatus::OB_MIGRATION_STATUS_HOLD;
|
||||
int64_t rebuild_seq = 0;
|
||||
|
||||
if (!is_inited_) {
|
||||
ret = OB_NOT_INIT;
|
||||
@ -1193,7 +1192,7 @@ int ObStartCompleteMigrationTask::update_ls_migration_status_hold_()
|
||||
} else if (OB_ISNULL(ls = ls_handle_.get_ls())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to change member list", K(ret), KP(ls));
|
||||
} else if (OB_FAIL(ls->set_migration_status(hold_status, rebuild_seq))) {
|
||||
} else if (OB_FAIL(ls->set_migration_status(hold_status, ctx_->rebuild_seq_))) {
|
||||
LOG_WARN("failed to set migration status", K(ret), KPC(ls));
|
||||
} else {
|
||||
#ifdef ERRSIM
|
||||
|
@ -443,6 +443,7 @@ int ObLSMeta::update_ls_meta(
|
||||
replayable_point_ = src_ls_meta.replayable_point_;
|
||||
tablet_change_checkpoint_ts_ = src_ls_meta.tablet_change_checkpoint_ts_;
|
||||
all_id_meta_.update_all_id_meta(src_ls_meta.all_id_meta_);
|
||||
rebuild_seq_ = tmp.rebuild_seq_;
|
||||
if (update_restore_status) {
|
||||
restore_status_ = ls_restore_status;
|
||||
}
|
||||
|
@ -1423,6 +1423,8 @@ int ObTabletTableStore::combin_ha_minor_sstables_(
|
||||
break;
|
||||
} else if (OB_FAIL(new_minor_sstables.push_back(table))) {
|
||||
LOG_WARN("failed to push minor table into array", K(ret), K(old_store_minor_sstables), KPC(table));
|
||||
} else {
|
||||
max_copy_end_log_ts = std::max(table->get_end_log_ts(), max_copy_end_log_ts);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1461,6 +1463,10 @@ int ObTabletTableStore::combin_ha_minor_sstables_(
|
||||
if (OB_ISNULL(new_table) || !new_table->is_minor_sstable()) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("new table is null or table type is unexpected", K(ret), KPC(new_table));
|
||||
} else if (new_table->get_end_log_ts() <= max_copy_end_log_ts) {
|
||||
//do nothing
|
||||
//need_add_minor_sstables is copied from src.
|
||||
//Old table store table will be reused when new table end log ts is smaller than old table.
|
||||
} else if (OB_FAIL(new_minor_sstables.push_back(new_table))) {
|
||||
LOG_WARN("failed to push minor table into array", K(ret), K(new_minor_sstables), KPC(new_table));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user