提交 ae138ca6 编写于 作者: O obdev 提交者: wangzelin.wzl

fix backup defend issue

上级 c70b8a05
......@@ -3993,7 +3993,6 @@ int ObLSBackupPrepareTask::get_tablet_min_filled_tx_log_ts_(
} else if (tablet->get_tablet_meta().tablet_id_.is_ls_inner_tablet()) {
// skip inner tablet
} else {
min_filled_tx_log_ts = tablet->get_tablet_meta().clog_checkpoint_ts_;
ObTabletTableStore &table_store = tablet->get_table_store();
const ObSSTableArray &sstable_array = table_store.get_minor_sstables();
has_minor_sstable = !sstable_array.empty();
......@@ -4008,7 +4007,8 @@ int ObLSBackupPrepareTask::get_tablet_min_filled_tx_log_ts_(
LOG_WARN("table ptr type not expectedd", K(ret));
} else if (FALSE_IT(sstable = static_cast<ObSSTable *>(table_ptr))) {
} else {
min_filled_tx_log_ts = std::min(sstable->get_meta().get_basic_meta().filled_tx_log_ts_, min_filled_tx_log_ts);
min_filled_tx_log_ts = std::min(
std::max(sstable->get_meta().get_basic_meta().filled_tx_log_ts_, sstable->get_end_log_ts()), min_filled_tx_log_ts);
}
}
}
......
......@@ -252,7 +252,7 @@ int ObBackupUtils::check_tablet_minor_sstable_validity_(const storage::ObTabletH
LOG_WARN("table ptr not correct", K(ret), KPC(last_table_ptr));
} else {
const ObITable::TableKey &table_key = last_table_ptr->get_key();
if (table_key.get_end_log_ts() != clog_checkpoint_ts) {
if (table_key.get_end_log_ts() < clog_checkpoint_ts) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("tablet meta is not valid", K(ret), K(table_key), K(clog_checkpoint_ts));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册